@@ -45,14 +45,17 @@ def test_init(self, primary_ip_response):
4545 assert bound_primary_ip .assignee_id == 17
4646 assert bound_primary_ip .assignee_type == "server"
4747
48- assert isinstance (bound_primary_ip .datacenter , BoundDatacenter )
49- assert bound_primary_ip .datacenter .id == 42
50- assert bound_primary_ip .datacenter .name == "fsn1-dc8"
51- assert bound_primary_ip .datacenter .description == "Falkenstein DC Park 8"
52- assert bound_primary_ip .datacenter .location .country == "DE"
53- assert bound_primary_ip .datacenter .location .city == "Falkenstein"
54- assert bound_primary_ip .datacenter .location .latitude == 50.47612
55- assert bound_primary_ip .datacenter .location .longitude == 12.370071
48+ with pytest .deprecated_call ():
49+ datacenter = bound_primary_ip .datacenter
50+
51+ assert isinstance (datacenter , BoundDatacenter )
52+ assert datacenter .id == 42
53+ assert datacenter .name == "fsn1-dc8"
54+ assert datacenter .description == "Falkenstein DC Park 8"
55+ assert datacenter .location .country == "DE"
56+ assert datacenter .location .city == "Falkenstein"
57+ assert datacenter .location .latitude == 50.47612
58+ assert datacenter .location .longitude == 12.370071
5659
5760
5861class TestPrimaryIPsClient :
@@ -132,9 +135,12 @@ def test_create_with_datacenter(
132135 ):
133136 request_mock .return_value = primary_ip_response
134137
135- response = primary_ips_client .create (
136- type = "ipv6" , name = "my-resource" , datacenter = Datacenter (name = "datacenter" )
137- )
138+ with pytest .deprecated_call ():
139+ response = primary_ips_client .create (
140+ type = "ipv6" ,
141+ name = "my-resource" ,
142+ datacenter = Datacenter (name = "datacenter" ),
143+ )
138144
139145 request_mock .assert_called_with (
140146 method = "POST" ,
0 commit comments