@@ -469,7 +469,7 @@ class NATGatewayTest(ClientBaseCase):
469469 def assert_natgateway_42 (natgateway : NATGateway ):
470470 assert natgateway .id == 42
471471 assert natgateway .label == "the-natgateway"
472- assert natgateway .region == "us-east"
472+ assert natgateway .region . id == "us-east"
473473 assert natgateway .address_autoscale_max == 4
474474 assert natgateway .default_ports_per_interface == 4096
475475 assert natgateway .portset_assignments == 15
@@ -521,10 +521,10 @@ def test_delete_natgateway(self):
521521 def assert_address_assignment (assignment : NATGatewayAddressAssignment ):
522522 assert assignment .address == "203.0.113.42"
523523 assert assignment .in_use is True
524- assert assignment .interface_count == 2
524+ assert assignment .interface_count == 1
525525 assert (
526526 assignment .interface_url
527- == "/v4/linode/instances/123/interfaces/456 "
527+ == "/v4/networking/natgateways/42/addresses/203.0.113.42/interfaces "
528528 )
529529 assert assignment .portset_assignments == 15
530530 assert assignment .portset_capacity == 30
@@ -590,15 +590,17 @@ def assert_interfaces(interfaces):
590590 assert first .linode .label == "linode1001"
591591 assert first .linode .type == "linode"
592592 assert first .linode .url == "/v4/linode/instances/1001"
593- assert first .addresses == ["172.24.213.144 " ]
594- assert first .portsets [0 ].address == "172.24.213.144 "
593+ assert first .addresses == ["203.0.113.42 " ]
594+ assert first .portsets [0 ].address == "203.0.113.42 "
595595 assert first .portsets [0 ].ports [0 ].start == 2048
596596 assert first .portsets [0 ].ports [0 ].end == 3071
597597
598598 second = interfaces [1 ]
599599 assert second .id == 143
600600 assert second .linode .id == 1002
601601 assert second .linode .label == "linode1002"
602+ assert second .addresses == ["203.0.113.43" ]
603+ assert second .portsets [0 ].address == "203.0.113.43"
602604
603605 def test_list_interfaces (self ):
604606 """
@@ -612,8 +614,9 @@ def test_list_address_interfaces(self):
612614 """
613615 Tests GET /networking/natgateways/{id}/addresses/{address}/interfaces.
614616
615- The per-address endpoint only returns interfaces actually using that
616- address, so the response is a subset of the gateway-wide list.
617+ The per-address endpoint returns only the interfaces using that
618+ specific address. In the fixture, only interface 142 uses
619+ 203.0.113.42; interface 143 uses 203.0.113.43.
617620 """
618621 natgateway = NATGateway (self .client , 42 )
619622 interfaces = natgateway .address_interfaces ("203.0.113.42" )
0 commit comments