|
10 | 10 | from cloudflare import Cloudflare, AsyncCloudflare
|
11 | 11 | from tests.utils import assert_matches_type
|
12 | 12 | from cloudflare.types import (
|
13 |
| - LeakedCredentialCheckListResponse, |
| 13 | + LeakedCredentialCheckGetResponse, |
14 | 14 | LeakedCredentialCheckCreateResponse,
|
15 | 15 | )
|
16 | 16 |
|
@@ -67,40 +67,40 @@ def test_path_params_create(self, client: Cloudflare) -> None:
|
67 | 67 | )
|
68 | 68 |
|
69 | 69 | @parametrize
|
70 |
| - def test_method_list(self, client: Cloudflare) -> None: |
71 |
| - leaked_credential_check = client.leaked_credential_checks.list( |
| 70 | + def test_method_get(self, client: Cloudflare) -> None: |
| 71 | + leaked_credential_check = client.leaked_credential_checks.get( |
72 | 72 | zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
73 | 73 | )
|
74 |
| - assert_matches_type(LeakedCredentialCheckListResponse, leaked_credential_check, path=["response"]) |
| 74 | + assert_matches_type(LeakedCredentialCheckGetResponse, leaked_credential_check, path=["response"]) |
75 | 75 |
|
76 | 76 | @parametrize
|
77 |
| - def test_raw_response_list(self, client: Cloudflare) -> None: |
78 |
| - response = client.leaked_credential_checks.with_raw_response.list( |
| 77 | + def test_raw_response_get(self, client: Cloudflare) -> None: |
| 78 | + response = client.leaked_credential_checks.with_raw_response.get( |
79 | 79 | zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
80 | 80 | )
|
81 | 81 |
|
82 | 82 | assert response.is_closed is True
|
83 | 83 | assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
84 | 84 | leaked_credential_check = response.parse()
|
85 |
| - assert_matches_type(LeakedCredentialCheckListResponse, leaked_credential_check, path=["response"]) |
| 85 | + assert_matches_type(LeakedCredentialCheckGetResponse, leaked_credential_check, path=["response"]) |
86 | 86 |
|
87 | 87 | @parametrize
|
88 |
| - def test_streaming_response_list(self, client: Cloudflare) -> None: |
89 |
| - with client.leaked_credential_checks.with_streaming_response.list( |
| 88 | + def test_streaming_response_get(self, client: Cloudflare) -> None: |
| 89 | + with client.leaked_credential_checks.with_streaming_response.get( |
90 | 90 | zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
91 | 91 | ) as response:
|
92 | 92 | assert not response.is_closed
|
93 | 93 | assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
94 | 94 |
|
95 | 95 | leaked_credential_check = response.parse()
|
96 |
| - assert_matches_type(LeakedCredentialCheckListResponse, leaked_credential_check, path=["response"]) |
| 96 | + assert_matches_type(LeakedCredentialCheckGetResponse, leaked_credential_check, path=["response"]) |
97 | 97 |
|
98 | 98 | assert cast(Any, response.is_closed) is True
|
99 | 99 |
|
100 | 100 | @parametrize
|
101 |
| - def test_path_params_list(self, client: Cloudflare) -> None: |
| 101 | + def test_path_params_get(self, client: Cloudflare) -> None: |
102 | 102 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
103 |
| - client.leaked_credential_checks.with_raw_response.list( |
| 103 | + client.leaked_credential_checks.with_raw_response.get( |
104 | 104 | zone_id="",
|
105 | 105 | )
|
106 | 106 |
|
@@ -155,39 +155,39 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
|
155 | 155 | )
|
156 | 156 |
|
157 | 157 | @parametrize
|
158 |
| - async def test_method_list(self, async_client: AsyncCloudflare) -> None: |
159 |
| - leaked_credential_check = await async_client.leaked_credential_checks.list( |
| 158 | + async def test_method_get(self, async_client: AsyncCloudflare) -> None: |
| 159 | + leaked_credential_check = await async_client.leaked_credential_checks.get( |
160 | 160 | zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
161 | 161 | )
|
162 |
| - assert_matches_type(LeakedCredentialCheckListResponse, leaked_credential_check, path=["response"]) |
| 162 | + assert_matches_type(LeakedCredentialCheckGetResponse, leaked_credential_check, path=["response"]) |
163 | 163 |
|
164 | 164 | @parametrize
|
165 |
| - async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: |
166 |
| - response = await async_client.leaked_credential_checks.with_raw_response.list( |
| 165 | + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: |
| 166 | + response = await async_client.leaked_credential_checks.with_raw_response.get( |
167 | 167 | zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
168 | 168 | )
|
169 | 169 |
|
170 | 170 | assert response.is_closed is True
|
171 | 171 | assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
172 | 172 | leaked_credential_check = await response.parse()
|
173 |
| - assert_matches_type(LeakedCredentialCheckListResponse, leaked_credential_check, path=["response"]) |
| 173 | + assert_matches_type(LeakedCredentialCheckGetResponse, leaked_credential_check, path=["response"]) |
174 | 174 |
|
175 | 175 | @parametrize
|
176 |
| - async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: |
177 |
| - async with async_client.leaked_credential_checks.with_streaming_response.list( |
| 176 | + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: |
| 177 | + async with async_client.leaked_credential_checks.with_streaming_response.get( |
178 | 178 | zone_id="023e105f4ecef8ad9ca31a8372d0c353",
|
179 | 179 | ) as response:
|
180 | 180 | assert not response.is_closed
|
181 | 181 | assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
182 | 182 |
|
183 | 183 | leaked_credential_check = await response.parse()
|
184 |
| - assert_matches_type(LeakedCredentialCheckListResponse, leaked_credential_check, path=["response"]) |
| 184 | + assert_matches_type(LeakedCredentialCheckGetResponse, leaked_credential_check, path=["response"]) |
185 | 185 |
|
186 | 186 | assert cast(Any, response.is_closed) is True
|
187 | 187 |
|
188 | 188 | @parametrize
|
189 |
| - async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: |
| 189 | + async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: |
190 | 190 | with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
|
191 |
| - await async_client.leaked_credential_checks.with_raw_response.list( |
| 191 | + await async_client.leaked_credential_checks.with_raw_response.get( |
192 | 192 | zone_id="",
|
193 | 193 | )
|
0 commit comments