10
10
from cloudflare import Cloudflare , AsyncCloudflare
11
11
from tests .utils import assert_matches_type
12
12
from cloudflare .types .certificate_authorities import (
13
- TLSHostnameAssociation ,
13
+ HostnameAssociationGetResponse ,
14
+ HostnameAssociationUpdateResponse ,
14
15
)
15
16
16
17
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
@@ -25,7 +26,7 @@ def test_method_update(self, client: Cloudflare) -> None:
25
26
hostname_association = client .certificate_authorities .hostname_associations .update (
26
27
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
27
28
)
28
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
29
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
29
30
30
31
@pytest .mark .skip ()
31
32
@parametrize
@@ -35,7 +36,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
35
36
hostnames = ["api.example.com" , "api.example.com" , "api.example.com" ],
36
37
mtls_certificate_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ,
37
38
)
38
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
39
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
39
40
40
41
@pytest .mark .skip ()
41
42
@parametrize
@@ -47,7 +48,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
47
48
assert response .is_closed is True
48
49
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
49
50
hostname_association = response .parse ()
50
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
51
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
51
52
52
53
@pytest .mark .skip ()
53
54
@parametrize
@@ -59,7 +60,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
59
60
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
60
61
61
62
hostname_association = response .parse ()
62
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
63
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
63
64
64
65
assert cast (Any , response .is_closed ) is True
65
66
@@ -77,7 +78,7 @@ def test_method_get(self, client: Cloudflare) -> None:
77
78
hostname_association = client .certificate_authorities .hostname_associations .get (
78
79
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
79
80
)
80
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
81
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
81
82
82
83
@pytest .mark .skip ()
83
84
@parametrize
@@ -86,7 +87,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
86
87
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
87
88
mtls_certificate_id = "b2134436-2555-4acf-be5b-26c48136575e" ,
88
89
)
89
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
90
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
90
91
91
92
@pytest .mark .skip ()
92
93
@parametrize
@@ -98,7 +99,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
98
99
assert response .is_closed is True
99
100
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
100
101
hostname_association = response .parse ()
101
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
102
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
102
103
103
104
@pytest .mark .skip ()
104
105
@parametrize
@@ -110,7 +111,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
110
111
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
111
112
112
113
hostname_association = response .parse ()
113
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
114
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
114
115
115
116
assert cast (Any , response .is_closed ) is True
116
117
@@ -132,7 +133,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
132
133
hostname_association = await async_client .certificate_authorities .hostname_associations .update (
133
134
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
134
135
)
135
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
136
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
136
137
137
138
@pytest .mark .skip ()
138
139
@parametrize
@@ -142,7 +143,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
142
143
hostnames = ["api.example.com" , "api.example.com" , "api.example.com" ],
143
144
mtls_certificate_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ,
144
145
)
145
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
146
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
146
147
147
148
@pytest .mark .skip ()
148
149
@parametrize
@@ -154,7 +155,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
154
155
assert response .is_closed is True
155
156
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
156
157
hostname_association = await response .parse ()
157
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
158
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
158
159
159
160
@pytest .mark .skip ()
160
161
@parametrize
@@ -166,7 +167,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
166
167
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
167
168
168
169
hostname_association = await response .parse ()
169
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
170
+ assert_matches_type (HostnameAssociationUpdateResponse , hostname_association , path = ["response" ])
170
171
171
172
assert cast (Any , response .is_closed ) is True
172
173
@@ -184,7 +185,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
184
185
hostname_association = await async_client .certificate_authorities .hostname_associations .get (
185
186
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
186
187
)
187
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
188
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
188
189
189
190
@pytest .mark .skip ()
190
191
@parametrize
@@ -193,7 +194,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
193
194
zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
194
195
mtls_certificate_id = "b2134436-2555-4acf-be5b-26c48136575e" ,
195
196
)
196
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
197
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
197
198
198
199
@pytest .mark .skip ()
199
200
@parametrize
@@ -205,7 +206,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
205
206
assert response .is_closed is True
206
207
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
207
208
hostname_association = await response .parse ()
208
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
209
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
209
210
210
211
@pytest .mark .skip ()
211
212
@parametrize
@@ -217,7 +218,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
217
218
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
218
219
219
220
hostname_association = await response .parse ()
220
- assert_matches_type (TLSHostnameAssociation , hostname_association , path = ["response" ])
221
+ assert_matches_type (HostnameAssociationGetResponse , hostname_association , path = ["response" ])
221
222
222
223
assert cast (Any , response .is_closed ) is True
223
224
0 commit comments