11import pytest
22
33from linode_api4 .objects import Region
4- from linode_api4 .objects .region import RegionVPCAvailability
54
65
76@pytest .mark .smoke
@@ -94,19 +93,6 @@ def test_get_region_availability_via_group(test_linode_client):
9493 assert isinstance (entry .available , bool )
9594
9695
97- def test_vpc_availability_matches_region_id (test_linode_client ):
98- """
99- Test that VPC availability region field matches the requested region.
100- """
101- client = test_linode_client
102-
103- # Test with a known region
104- region_id = "us-east"
105- vpc_avail = client .regions .vpc_availability_get (region_id )
106-
107- assert vpc_avail .region == region_id
108-
109-
11096def test_vpc_availability_available_regions (test_linode_client ):
11197 """
11298 Test that some regions have VPC availability enabled.
@@ -120,49 +106,3 @@ def test_vpc_availability_available_regions(test_linode_client):
120106
121107 # There should be at least some regions with VPC available
122108 assert len (available_regions ) > 0
123-
124- # Check that available regions have proper data
125- for entry in available_regions :
126- assert entry .region is not None
127- assert entry .available is True
128-
129-
130- def test_vpc_availability_pagination (test_linode_client ):
131- """
132- Test that VPC availability listing returns all entries.
133- """
134- client = test_linode_client
135-
136- # Get all VPC availability entries
137- all_entries = client .regions .vpc_availability ()
138-
139- # Verify we got results
140- assert len (all_entries ) > 0
141-
142- # Each entry should have required fields
143- for entry in all_entries :
144- assert entry .region is not None
145- assert entry .available is not None
146- assert entry .available_ipv6_prefix_lengths is not None
147-
148-
149- def test_vpc_availability_list_complete (test_linode_client ):
150- """
151- Test that vpc_availability endpoint returns complete list of all regions.
152- """
153- client = test_linode_client
154-
155- # Get VPC availability for all regions
156- vpc_availability = client .regions .vpc_availability ()
157-
158- # Get all regions
159- all_regions = client .regions ()
160-
161- # VPC availability should contain entries for all regions
162- assert len (vpc_availability ) == len (all_regions )
163-
164- # Verify each region has a VPC availability entry
165- vpc_region_ids = {v .region for v in vpc_availability }
166- all_region_ids = {r .id for r in all_regions }
167-
168- assert vpc_region_ids == all_region_ids
0 commit comments