diff --git a/.stats.yml b/.stats.yml index aa5b891ae18..e1aa4a76cd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08160758435c3d32f9f1d296fcd9664e5b67e7c453403bf02ac81f023ec470a3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py index 0b40f4dd9f3..3e000cb7f2c 100644 --- a/tests/api_resources/accounts/test_members.py +++ b/tests/api_resources/accounts/test_members.py @@ -355,7 +355,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: member = client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberUpdateResponse], member, path=["response"]) @@ -364,7 +364,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: member = client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -378,7 +378,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -391,7 +391,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -407,13 +407,13 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -421,7 +421,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: member = client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -468,7 +468,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -519,7 +519,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -573,7 +573,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", policies=[ { @@ -617,7 +617,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -713,7 +713,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: member = client.accounts.members.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) @@ -722,7 +722,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -735,7 +735,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -751,13 +751,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.delete( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -765,7 +765,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: member = client.accounts.members.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberGetResponse], member, path=["response"]) @@ -774,7 +774,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -787,7 +787,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -803,13 +803,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.get( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1148,7 +1148,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberUpdateResponse], member, path=["response"]) @@ -1157,7 +1157,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -1171,7 +1171,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1184,7 +1184,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -1200,13 +1200,13 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1214,7 +1214,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1261,7 +1261,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1312,7 +1312,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1366,7 +1366,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", policies=[ { @@ -1410,7 +1410,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.update( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", policies=[ { @@ -1506,7 +1506,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) @@ -1515,7 +1515,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1528,7 +1528,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -1544,13 +1544,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.members.with_raw_response.delete( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.delete( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1558,7 +1558,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[MemberGetResponse], member, path=["response"]) @@ -1567,7 +1567,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -1580,7 +1580,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -1596,12 +1596,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.members.with_raw_response.get( - "4536bcfad5faccb111b47003c79917fa", + member_id="4536bcfad5faccb111b47003c79917fa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): await async_client.accounts.members.with_raw_response.get( - "", + member_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 4236c1b2b13..49b18f2dade 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: role = client.accounts.roles.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(object, role, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.roles.with_streaming_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -94,7 +94,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="", ) @@ -143,7 +143,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(object, role, path=["response"]) @@ -151,7 +151,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -163,7 +163,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.roles.with_streaming_response.get( - {}, + role_id={}, account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -178,6 +178,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.roles.with_raw_response.get( - {}, + role_id={}, account_id="", ) diff --git a/tests/api_resources/addressing/address_maps/test_accounts.py b/tests/api_resources/addressing/address_maps/test_accounts.py index 048fa6d00a5..4010149e6ea 100644 --- a/tests/api_resources/addressing/address_maps/test_accounts.py +++ b/tests/api_resources/addressing/address_maps/test_accounts.py @@ -20,7 +20,7 @@ class TestAccounts: @parametrize def test_method_update(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.update( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: account = client.addressing.address_maps.accounts.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) @@ -81,7 +81,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.accounts.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.accounts.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncAccounts: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.update( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -178,7 +178,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: account = await async_client.addressing.address_maps.accounts.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.accounts.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.accounts.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/address_maps/test_ips.py b/tests/api_resources/addressing/address_maps/test_ips.py index 418da599930..8c957cb7f53 100644 --- a/tests/api_resources/addressing/address_maps/test_ips.py +++ b/tests/api_resources/addressing/address_maps/test_ips.py @@ -20,7 +20,7 @@ class TestIPs: @parametrize def test_method_update(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -69,7 +69,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", body={}, @@ -77,7 +77,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): client.addressing.address_maps.ips.with_raw_response.update( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -86,7 +86,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ip = client.addressing.address_maps.ips.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -95,7 +95,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -108,7 +108,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.ips.with_streaming_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -124,21 +124,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): client.addressing.address_maps.ips.with_raw_response.delete( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -150,7 +150,7 @@ class TestAsyncIPs: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -160,7 +160,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -174,7 +174,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -191,7 +191,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -199,7 +199,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", body={}, @@ -207,7 +207,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.update( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -216,7 +216,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ip = await async_client.addressing.address_maps.ips.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -225,7 +225,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.ips.with_streaming_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -254,21 +254,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( - "192.0.2.1", + ip_address="192.0.2.1", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_address` but received ''"): await async_client.addressing.address_maps.ips.with_raw_response.delete( - "", + ip_address="", account_id="023e105f4ecef8ad9ca31a8372d0c353", address_map_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/address_maps/test_zones.py b/tests/api_resources/addressing/address_maps/test_zones.py index 2eb4c69d4b1..15ab975e8ed 100644 --- a/tests/api_resources/addressing/address_maps/test_zones.py +++ b/tests/api_resources/addressing/address_maps/test_zones.py @@ -20,7 +20,7 @@ class TestZones: @parametrize def test_method_update(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -69,7 +69,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, @@ -77,7 +77,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.update( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -86,7 +86,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: zone = client.addressing.address_maps.zones.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -95,7 +95,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -108,7 +108,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.zones.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -124,21 +124,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.zones.with_raw_response.delete( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -150,7 +150,7 @@ class TestAsyncZones: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -160,7 +160,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -174,7 +174,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -191,7 +191,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -199,7 +199,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, @@ -207,7 +207,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.update( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, @@ -216,7 +216,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: zone = await async_client.addressing.address_maps.zones.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -225,7 +225,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.zones.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -254,21 +254,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.zones.with_raw_response.delete( - "", + address_map_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/loa_documents/test_downloads.py b/tests/api_resources/addressing/loa_documents/test_downloads.py index 5c401decdfe..b4ff36279c0 100644 --- a/tests/api_resources/addressing/loa_documents/test_downloads.py +++ b/tests/api_resources/addressing/loa_documents/test_downloads.py @@ -33,7 +33,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.addressing.loa_documents.downloads.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -52,7 +52,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -71,7 +71,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.addressing.loa_documents.downloads.with_streaming_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -91,13 +91,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `loa_document_id` but received ''"): client.addressing.loa_documents.downloads.with_raw_response.get( - "", + loa_document_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,7 +115,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.addressing.loa_documents.downloads.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -134,7 +134,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -153,7 +153,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/addressing/loa_documents/d933b1530bc56c9953cf8ce166da8004/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.addressing.loa_documents.downloads.with_streaming_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -173,12 +173,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.loa_documents.downloads.with_raw_response.get( - "d933b1530bc56c9953cf8ce166da8004", + loa_document_id="d933b1530bc56c9953cf8ce166da8004", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `loa_document_id` but received ''"): await async_client.addressing.loa_documents.downloads.with_raw_response.get( - "", + loa_document_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py index 00ba32f6d14..1fca628ca73 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py @@ -21,7 +21,7 @@ class TestBindings: @parametrize def test_method_create(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -66,20 +66,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[ServiceBinding], binding, path=["response"]) @@ -87,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,20 +114,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -165,21 +165,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: binding = client.addressing.prefixes.bgp.bindings.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -196,7 +196,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.bindings.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -225,21 +225,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -251,7 +251,7 @@ class TestAsyncBindings: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceBinding], binding, path=["response"]) @@ -259,7 +259,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", service_id="2db684ee7ca04e159946fd05b99e1bcd", @@ -269,7 +269,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -281,7 +281,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -296,20 +296,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[ServiceBinding], binding, path=["response"]) @@ -317,7 +317,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -329,7 +329,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -344,20 +344,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -366,7 +366,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -379,7 +379,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -395,21 +395,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.delete( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -417,7 +417,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: binding = await async_client.addressing.prefixes.bgp.bindings.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -426,7 +426,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -439,7 +439,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.bindings.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -455,21 +455,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + binding_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `binding_id` but received ''"): await async_client.addressing.prefixes.bgp.bindings.with_raw_response.get( - "", + binding_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py index 26c21604b3d..c0486fa677a 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py @@ -21,7 +21,7 @@ class TestPrefixes: @parametrize def test_method_list(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[BGPPrefix], prefix, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -56,20 +56,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -78,7 +78,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", on_demand={"advertised": True}, @@ -88,7 +88,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -101,7 +101,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -117,21 +117,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.bgp.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -148,7 +148,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -161,7 +161,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -177,21 +177,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -203,7 +203,7 @@ class TestAsyncPrefixes: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[BGPPrefix], prefix, path=["response"]) @@ -211,7 +211,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,20 +238,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", on_demand={"advertised": True}, @@ -270,7 +270,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -283,7 +283,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -299,21 +299,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.edit( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -321,7 +321,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.bgp.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -330,7 +330,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -343,7 +343,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -359,21 +359,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bgp_prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bgp_prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.prefixes.with_raw_response.get( - "", + bgp_prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/bgp/test_statuses.py b/tests/api_resources/addressing/prefixes/bgp/test_statuses.py index 50503a8f33f..3a1bf7f4e57 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_statuses.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_statuses.py @@ -20,7 +20,7 @@ class TestStatuses: @parametrize def test_method_edit(self, client: Cloudflare) -> None: status = client.addressing.prefixes.bgp.statuses.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -29,7 +29,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -42,7 +42,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.statuses.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", advertised=True, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -73,7 +73,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.addressing.prefixes.bgp.statuses.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) @@ -81,7 +81,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.bgp.statuses.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncStatuses: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: status = await async_client.addressing.prefixes.bgp.statuses.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -134,7 +134,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -147,7 +147,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.statuses.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", advertised=True, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.statuses.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", advertised=True, ) @@ -178,7 +178,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.addressing.prefixes.bgp.statuses.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[StatusGetResponse], status, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.bgp.statuses.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.bgp.statuses.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index 0ee088ab967..dd17a7ac44b 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -21,7 +21,7 @@ class TestDelegations: @parametrize def test_method_create(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -70,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -79,7 +79,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Delegations], delegation, path=["response"]) @@ -87,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,20 +114,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: delegation = client.addressing.prefixes.delegations.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.delegations.with_streaming_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -165,21 +165,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): client.addressing.prefixes.delegations.with_raw_response.delete( - "", + delegation_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,7 +191,7 @@ class TestAsyncDelegations: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -201,7 +201,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -215,7 +215,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -232,7 +232,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -240,7 +240,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.create( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cidr="192.0.2.0/24", delegated_account_id="b1946ac92492d2347c6235b4d2611184", @@ -249,7 +249,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Delegations], delegation, path=["response"]) @@ -257,7 +257,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -269,7 +269,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -284,20 +284,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.list( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: delegation = await async_client.addressing.prefixes.delegations.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -306,7 +306,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -319,7 +319,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.delegations.with_streaming_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -335,21 +335,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "d933b1530bc56c9953cf8ce166da8004", + delegation_id="d933b1530bc56c9953cf8ce166da8004", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `delegation_id` but received ''"): await async_client.addressing.prefixes.delegations.with_raw_response.delete( - "", + delegation_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prefix_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index f8e982e4260..e38cf946883 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -130,7 +130,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) @@ -138,7 +138,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -150,7 +150,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -165,20 +165,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) @@ -186,7 +186,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", default_sni="*.example.com", description="My Ecommerce zones", @@ -197,7 +197,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -224,20 +224,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.edit( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) @@ -245,7 +245,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -257,7 +257,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.address_maps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -272,13 +272,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): client.addressing.address_maps.with_raw_response.get( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapDeleteResponse], address_map, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -427,20 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.delete( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMap], address_map, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", default_sni="*.example.com", description="My Ecommerce zones", @@ -459,7 +459,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -471,7 +471,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -486,20 +486,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.edit( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AddressMapGetResponse], address_map, path=["response"]) @@ -507,7 +507,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -519,7 +519,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.address_maps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -534,12 +534,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + address_map_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"): await async_client.addressing.address_maps.with_raw_response.get( - "", + address_map_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index b26d7471d10..7b593cbebbf 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -109,7 +109,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) @@ -117,7 +117,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -129,7 +129,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -144,20 +144,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.delete( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -166,7 +166,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -179,7 +179,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) as response: @@ -195,14 +195,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", description="Internal test prefix", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -210,7 +210,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @@ -218,7 +218,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -230,7 +230,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -245,13 +245,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): client.addressing.prefixes.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -350,7 +350,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PrefixDeleteResponse], prefix, path=["response"]) @@ -358,7 +358,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -370,7 +370,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -385,20 +385,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.delete( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -407,7 +407,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -420,7 +420,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) as response: @@ -436,14 +436,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", description="Internal test prefix", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.edit( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Internal test prefix", ) @@ -451,7 +451,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Prefix], prefix, path=["response"]) @@ -459,7 +459,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -471,7 +471,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.prefixes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -486,12 +486,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + prefix_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `prefix_id` but received ''"): await async_client.addressing.prefixes.with_raw_response.get( - "", + prefix_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/addressing/test_regional_hostnames.py b/tests/api_resources/addressing/test_regional_hostnames.py index 3dc5d085fba..bb0cf870331 100644 --- a/tests/api_resources/addressing/test_regional_hostnames.py +++ b/tests/api_resources/addressing/test_regional_hostnames.py @@ -111,7 +111,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: regional_hostname = client.addressing.regional_hostnames.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"]) @@ -119,7 +119,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.addressing.regional_hostnames.with_streaming_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -146,20 +146,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.addressing.regional_hostnames.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: regional_hostname = client.addressing.regional_hostnames.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -168,7 +168,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -181,7 +181,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.addressing.regional_hostnames.with_streaming_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) as response: @@ -197,14 +197,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="", region_key="ca", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.addressing.regional_hostnames.with_raw_response.edit( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -212,7 +212,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: regional_hostname = client.addressing.regional_hostnames.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"]) @@ -220,7 +220,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -232,7 +232,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.addressing.regional_hostnames.with_streaming_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -247,13 +247,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.addressing.regional_hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -348,7 +348,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: regional_hostname = await async_client.addressing.regional_hostnames.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionalHostnameDeleteResponse, regional_hostname, path=["response"]) @@ -356,7 +356,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -368,7 +368,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.regional_hostnames.with_streaming_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -383,20 +383,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.delete( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: regional_hostname = await async_client.addressing.regional_hostnames.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -405,7 +405,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -418,7 +418,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.regional_hostnames.with_streaming_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) as response: @@ -434,14 +434,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.edit( - "foo.example.com", + hostname="foo.example.com", zone_id="", region_key="ca", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.edit( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region_key="ca", ) @@ -449,7 +449,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: regional_hostname = await async_client.addressing.regional_hostnames.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RegionalHostnameGetResponse], regional_hostname, path=["response"]) @@ -457,7 +457,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -469,7 +469,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.addressing.regional_hostnames.with_streaming_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -484,12 +484,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.get( - "foo.example.com", + hostname="foo.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.addressing.regional_hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/ai_gateway/test_logs.py b/tests/api_resources/ai_gateway/test_logs.py index 79fbfbf7ca0..7bcb2da715a 100644 --- a/tests/api_resources/ai_gateway/test_logs.py +++ b/tests/api_resources/ai_gateway/test_logs.py @@ -22,7 +22,7 @@ class TestLogs: @parametrize def test_method_list(self, client: Cloudflare) -> None: log = client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(SyncV4PagePaginationArray[LogListResponse], log, path=["response"]) @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: log = client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", cached=True, direction="asc", @@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: order_by="created_at", page=1, per_page=5, - search="string", + search="search", start_date=parse_datetime("2019-12-27T18:11:19.117Z"), success=True, ) @@ -47,7 +47,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.ai_gateway.logs.with_raw_response.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -59,7 +59,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.ai_gateway.logs.with_streaming_response.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed @@ -74,13 +74,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.ai_gateway.logs.with_raw_response.list( - "my-gateway", + id="my-gateway", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.logs.with_raw_response.list( - "", + id="", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -91,7 +91,7 @@ class TestAsyncLogs: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: log = await async_client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) assert_matches_type(AsyncV4PagePaginationArray[LogListResponse], log, path=["response"]) @@ -99,7 +99,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: log = await async_client.ai_gateway.logs.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", cached=True, direction="asc", @@ -107,7 +107,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) order_by="created_at", page=1, per_page=5, - search="string", + search="search", start_date=parse_datetime("2019-12-27T18:11:19.117Z"), success=True, ) @@ -116,7 +116,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.logs.with_raw_response.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) @@ -128,7 +128,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.logs.with_streaming_response.list( - "my-gateway", + id="my-gateway", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) as response: assert not response.is_closed @@ -143,12 +143,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.ai_gateway.logs.with_raw_response.list( - "my-gateway", + id="my-gateway", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.logs.with_raw_response.list( - "", + id="", account_id="0d37909e38d3e99c29fa2cd343ac421a", ) diff --git a/tests/api_resources/alerting/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py index a0b32fc9ce4..05247187082 100644 --- a/tests/api_resources/alerting/destinations/test_pagerduty.py +++ b/tests/api_resources/alerting/destinations/test_pagerduty.py @@ -154,7 +154,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: @parametrize def test_method_link(self, client: Cloudflare) -> None: pagerduty = client.alerting.destinations.pagerduty.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PagerdutyLinkResponse], pagerduty, path=["response"]) @@ -165,7 +165,7 @@ def test_method_link(self, client: Cloudflare) -> None: @parametrize def test_raw_response_link(self, client: Cloudflare) -> None: response = client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -180,7 +180,7 @@ def test_raw_response_link(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_link(self, client: Cloudflare) -> None: with client.alerting.destinations.pagerduty.with_streaming_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -198,13 +198,13 @@ def test_streaming_response_link(self, client: Cloudflare) -> None: def test_path_params_link(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): client.alerting.destinations.pagerduty.with_raw_response.link( - "", + token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -344,7 +344,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_link(self, async_client: AsyncCloudflare) -> None: pagerduty = await async_client.alerting.destinations.pagerduty.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PagerdutyLinkResponse], pagerduty, path=["response"]) @@ -355,7 +355,7 @@ async def test_method_link(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -370,7 +370,7 @@ async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.pagerduty.with_streaming_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -388,12 +388,12 @@ async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> N async def test_path_params_link(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.pagerduty.with_raw_response.link( - "8c71e667571b4f61b94d9e4b12158038", + token_id="8c71e667571b4f61b94d9e4b12158038", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"): await async_client.alerting.destinations.pagerduty.with_raw_response.link( - "", + token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index bf8bc07acdf..ea816e0bdbf 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -44,7 +44,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookCreateResponse], webhook, path=["response"]) @@ -100,7 +100,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -113,11 +113,11 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) @@ -127,7 +127,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -144,7 +144,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -164,7 +164,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -172,7 +172,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.update( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -219,7 +219,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WebhookDeleteResponse, webhook, path=["response"]) @@ -227,7 +227,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -239,7 +239,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -254,13 +254,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.delete( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Webhooks], webhook, path=["response"]) @@ -281,7 +281,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -296,7 +296,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.destinations.webhooks.with_streaming_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -314,13 +314,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): client.alerting.destinations.webhooks.with_raw_response.get( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,7 +349,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookCreateResponse], webhook, path=["response"]) @@ -405,7 +405,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -418,11 +418,11 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", - secret="string", + secret="secret", ) assert_matches_type(Optional[WebhookUpdateResponse], webhook, path=["response"]) @@ -432,7 +432,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -449,7 +449,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -469,7 +469,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.update( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -477,7 +477,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.update( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="Slack Webhook", url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd", @@ -524,7 +524,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WebhookDeleteResponse, webhook, path=["response"]) @@ -532,7 +532,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -544,7 +544,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -559,13 +559,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.delete( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.delete( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -575,7 +575,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Webhooks], webhook, path=["response"]) @@ -586,7 +586,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -601,7 +601,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.destinations.webhooks.with_streaming_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -619,12 +619,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.get( - "b115d5ec-15c6-41ee-8b76-92c449b5227b", + webhook_id="b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"): await async_client.alerting.destinations.webhooks.with_raw_response.get( - "", + webhook_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index 7f5b50e9c10..b88cc65631a 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -172,7 +172,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -183,7 +183,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", alert_type="universal_ssl_event_type", description="Something describing the policy.", @@ -245,7 +245,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -278,13 +278,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.alerting.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -329,7 +329,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.alerting.policies.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PolicyDeleteResponse, policy, path=["response"]) @@ -337,7 +337,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,7 +349,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -364,13 +364,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.alerting.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -380,7 +380,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.alerting.policies.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -391,7 +391,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -406,7 +406,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.alerting.policies.with_streaming_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -424,13 +424,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.alerting.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -587,7 +587,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -598,7 +598,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", alert_type="universal_ssl_event_type", description="Something describing the policy.", @@ -660,7 +660,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -675,7 +675,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -693,13 +693,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.policies.with_raw_response.update( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.alerting.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -744,7 +744,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PolicyDeleteResponse, policy, path=["response"]) @@ -752,7 +752,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -764,7 +764,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -779,13 +779,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.policies.with_raw_response.delete( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.alerting.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -795,7 +795,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -806,7 +806,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -821,7 +821,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.alerting.policies.with_streaming_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -839,12 +839,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.alerting.policies.with_raw_response.get( - "0da2b59e-f118-439d-8097-bdfb215203c9", + policy_id="0da2b59e-f118-439d-8097-bdfb215203c9", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.alerting.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/discovery/test_operations.py b/tests/api_resources/api_gateway/discovery/test_operations.py index 3318acf896a..f88028bff92 100644 --- a/tests/api_resources/api_gateway/discovery/test_operations.py +++ b/tests/api_resources/api_gateway/discovery/test_operations.py @@ -77,7 +77,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationEditResponse, operation, path=["response"]) @@ -85,7 +85,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", state="review", ) @@ -94,7 +94,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.api_gateway.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -106,7 +106,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.api_gateway.discovery.operations.with_streaming_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -121,13 +121,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.discovery.operations.with_raw_response.edit( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -193,7 +193,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationEditResponse, operation, path=["response"]) @@ -201,7 +201,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.discovery.operations.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", state="review", ) @@ -210,7 +210,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.discovery.operations.with_streaming_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -237,12 +237,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.discovery.operations.with_raw_response.edit( - "0d9bf70c-92e1-4bb3-9411-34a3bcc59003", + operation_id="0d9bf70c-92e1-4bb3-9411-34a3bcc59003", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.discovery.operations.with_raw_response.edit( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/operations/test_schema_validation.py b/tests/api_resources/api_gateway/operations/test_schema_validation.py index c821655f2da..21c19d6c184 100644 --- a/tests/api_resources/api_gateway/operations/test_schema_validation.py +++ b/tests/api_resources/api_gateway/operations/test_schema_validation.py @@ -24,7 +24,7 @@ class TestSchemaValidation: @parametrize def test_method_update(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @@ -32,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", mitigation_action="block", ) @@ -41,7 +41,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.api_gateway.operations.schema_validation.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,13 +68,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.update( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -135,7 +135,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: schema_validation = client.api_gateway.operations.schema_validation.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) @@ -143,7 +143,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -155,7 +155,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.api_gateway.operations.schema_validation.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -170,13 +170,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.schema_validation.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ class TestAsyncSchemaValidation: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationUpdateResponse, schema_validation, path=["response"]) @@ -195,7 +195,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.operations.schema_validation.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", mitigation_action="block", ) @@ -204,7 +204,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.operations.schema_validation.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -231,13 +231,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.update( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -298,7 +298,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schema_validation = await async_client.api_gateway.operations.schema_validation.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SchemaValidationGetResponse, schema_validation, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -318,7 +318,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.operations.schema_validation.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -333,12 +333,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.schema_validation.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/test_operations.py b/tests/api_resources/api_gateway/test_operations.py index 6c0d2194715..e6b994c1ebb 100644 --- a/tests/api_resources/api_gateway/test_operations.py +++ b/tests/api_resources/api_gateway/test_operations.py @@ -184,7 +184,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationDeleteResponse, operation, path=["response"]) @@ -192,7 +192,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -204,7 +204,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.api_gateway.operations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -219,20 +219,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.with_raw_response.delete( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(APIShield, operation, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", feature=["thresholds"], ) @@ -249,7 +249,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -261,7 +261,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.api_gateway.operations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -276,13 +276,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.api_gateway.operations.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -452,7 +452,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(OperationDeleteResponse, operation, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -472,7 +472,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.operations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -487,20 +487,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.delete( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(APIShield, operation, path=["response"]) @@ -508,7 +508,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.operations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", feature=["thresholds"], ) @@ -517,7 +517,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -529,7 +529,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.operations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -544,12 +544,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + operation_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.api_gateway.operations.with_raw_response.get( - "", + operation_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/test_user_schemas.py b/tests/api_resources/api_gateway/test_user_schemas.py index dddeafd45e8..e4b1af33b96 100644 --- a/tests/api_resources/api_gateway/test_user_schemas.py +++ b/tests/api_resources/api_gateway/test_user_schemas.py @@ -131,7 +131,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) @@ -139,7 +139,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -151,7 +151,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -166,20 +166,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.delete( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -187,7 +187,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_enabled=True, ) @@ -196,7 +196,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -208,7 +208,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.with_streaming_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -223,20 +223,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.edit( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -244,7 +244,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: user_schema = client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", omit_source=True, ) @@ -253,7 +253,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -265,7 +265,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -280,13 +280,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.with_raw_response.get( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -403,7 +403,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UserSchemaDeleteResponse, user_schema, path=["response"]) @@ -411,7 +411,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -423,7 +423,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -438,20 +438,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.delete( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -459,7 +459,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_enabled=True, ) @@ -468,7 +468,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -480,7 +480,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.with_streaming_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -495,20 +495,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.edit( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.edit( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PublicSchema, user_schema, path=["response"]) @@ -516,7 +516,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: user_schema = await async_client.api_gateway.user_schemas.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", omit_source=True, ) @@ -525,7 +525,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -537,7 +537,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -552,12 +552,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.with_raw_response.get( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/api_gateway/user_schemas/test_operations.py b/tests/api_resources/api_gateway/user_schemas/test_operations.py index ff5257f64c9..a613b248c2a 100644 --- a/tests/api_resources/api_gateway/user_schemas/test_operations.py +++ b/tests/api_resources/api_gateway/user_schemas/test_operations.py @@ -21,7 +21,7 @@ class TestOperations: @parametrize def test_method_list(self, client: Cloudflare) -> None: operation = client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[OperationListResponse], operation, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: operation = client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", endpoint="/api/v1", feature=["thresholds"], @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -56,7 +56,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.api_gateway.user_schemas.operations.with_streaming_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -71,13 +71,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): client.api_gateway.user_schemas.operations.with_raw_response.list( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -88,7 +88,7 @@ class TestAsyncOperations: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[OperationListResponse], operation, path=["response"]) @@ -96,7 +96,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: operation = await async_client.api_gateway.user_schemas.operations.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", endpoint="/api/v1", feature=["thresholds"], @@ -111,7 +111,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -123,7 +123,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.api_gateway.user_schemas.operations.with_streaming_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -138,12 +138,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + schema_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `schema_id` but received ''"): await async_client.api_gateway.user_schemas.operations.with_raw_response.list( - "", + schema_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/calls/turn/test_keys.py b/tests/api_resources/calls/turn/test_keys.py index 65c537af125..c0359f2da99 100644 --- a/tests/api_resources/calls/turn/test_keys.py +++ b/tests/api_resources/calls/turn/test_keys.py @@ -70,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: key = client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -78,7 +78,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: key = client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my-turn-key", ) @@ -87,7 +87,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.calls.turn.keys.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,13 +114,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): client.calls.turn.keys.with_raw_response.update( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -165,7 +165,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.calls.turn.keys.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -173,7 +173,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -185,7 +185,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.calls.turn.keys.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -200,20 +200,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): client.calls.turn.keys.with_raw_response.delete( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: key = client.calls.turn.keys.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -221,7 +221,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -233,7 +233,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.calls.turn.keys.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -248,13 +248,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): client.calls.turn.keys.with_raw_response.get( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -311,7 +311,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -319,7 +319,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="my-turn-key", ) @@ -328,7 +328,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -340,7 +340,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.turn.keys.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -355,13 +355,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.update( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -406,7 +406,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -414,7 +414,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -426,7 +426,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.turn.keys.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -441,20 +441,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.delete( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: key = await async_client.calls.turn.keys.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, key, path=["response"]) @@ -462,7 +462,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -474,7 +474,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.turn.keys.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -489,12 +489,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + key_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_id` but received ''"): await async_client.calls.turn.keys.with_raw_response.get( - "", + key_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/challenges/test_widgets.py b/tests/api_resources/challenges/test_widgets.py index 4182376aa3d..5aee8ea8221 100644 --- a/tests/api_resources/challenges/test_widgets.py +++ b/tests/api_resources/challenges/test_widgets.py @@ -92,7 +92,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: widget = client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -103,7 +103,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -117,7 +117,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -132,7 +132,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -150,7 +150,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -159,7 +159,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.update( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -218,7 +218,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: widget = client.challenges.widgets.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -226,7 +226,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -253,20 +253,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.delete( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: widget = client.challenges.widgets.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -274,7 +274,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -286,7 +286,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -301,20 +301,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.get( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_rotate_secret(self, client: Cloudflare) -> None: widget = client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -322,7 +322,7 @@ def test_method_rotate_secret(self, client: Cloudflare) -> None: @parametrize def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: widget = client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) @@ -331,7 +331,7 @@ def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: response = client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -343,7 +343,7 @@ def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: with client.challenges.widgets.with_streaming_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -358,13 +358,13 @@ def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: def test_path_params_rotate_secret(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): client.challenges.widgets.with_raw_response.rotate_secret( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -443,7 +443,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -454,7 +454,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -468,7 +468,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -483,7 +483,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -501,7 +501,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.challenges.widgets.with_raw_response.update( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -510,7 +510,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.update( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", domains=["203.0.113.1", "cloudflare.com", "blog.example.com"], mode="invisible", @@ -569,7 +569,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -577,7 +577,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -589,7 +589,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -604,20 +604,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.challenges.widgets.with_raw_response.delete( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.delete( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -625,7 +625,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -637,7 +637,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -652,20 +652,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.challenges.widgets.with_raw_response.get( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.get( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Widget], widget, path=["response"]) @@ -673,7 +673,7 @@ async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None @parametrize async def test_method_rotate_secret_with_all_params(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) @@ -682,7 +682,7 @@ async def test_method_rotate_secret_with_all_params(self, async_client: AsyncClo @parametrize async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) -> None: response = await async_client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -694,7 +694,7 @@ async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) - @parametrize async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudflare) -> None: async with async_client.challenges.widgets.with_streaming_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -709,12 +709,12 @@ async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudfl async def test_path_params_rotate_secret(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.challenges.widgets.with_raw_response.rotate_secret( - "0x4AAF00AAAABn0R22HWm-YUc", + sitekey="0x4AAF00AAAABn0R22HWm-YUc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `sitekey` but received ''"): await async_client.challenges.widgets.with_raw_response.rotate_secret( - "", + sitekey="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/cloudforce_one/requests/test_message.py b/tests/api_resources/cloudforce_one/requests/test_message.py index e804d3ab846..af281c7eb9f 100644 --- a/tests/api_resources/cloudforce_one/requests/test_message.py +++ b/tests/api_resources/cloudforce_one/requests/test_message.py @@ -25,7 +25,7 @@ class TestMessage: @parametrize def test_method_create(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Message], message, path=["response"]) @@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -69,20 +69,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.create( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -91,7 +91,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", content="What regions were most effected by the recent DoS?", @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -118,7 +118,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -134,14 +134,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -149,7 +149,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -158,7 +158,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -171,7 +171,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -187,14 +187,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -202,7 +202,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -212,7 +212,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: message = client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -226,7 +226,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -240,7 +240,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.message.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -257,7 +257,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", page=0, per_page=10, @@ -265,7 +265,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.message.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -278,7 +278,7 @@ class TestAsyncMessage: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Message], message, path=["response"]) @@ -286,7 +286,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="Can you elaborate on the type of DoS that occurred?", ) @@ -295,7 +295,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -307,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -322,20 +322,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.create( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -344,7 +344,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", content="What regions were most effected by the recent DoS?", @@ -358,7 +358,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -371,7 +371,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -387,14 +387,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.update( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -402,7 +402,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -411,7 +411,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -424,7 +424,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -440,14 +440,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="", request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.delete( - 0, + message_identifer=0, account_identifier="023e105f4ecef8ad9ca31a8372d0c353", request_identifier="", ) @@ -455,7 +455,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -465,7 +465,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.cloudforce_one.requests.message.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -479,7 +479,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -493,7 +493,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.message.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, @@ -510,7 +510,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", page=0, per_page=10, @@ -518,7 +518,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.message.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, diff --git a/tests/api_resources/cloudforce_one/requests/test_priority.py b/tests/api_resources/cloudforce_one/requests/test_priority.py index 012e01b34cf..a3078846680 100644 --- a/tests/api_resources/cloudforce_one/requests/test_priority.py +++ b/tests/api_resources/cloudforce_one/requests/test_priority.py @@ -24,7 +24,7 @@ class TestPriority: @parametrize def test_method_create(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -68,7 +68,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.create( - "", + account_identifier="", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -78,7 +78,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -90,7 +90,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -106,7 +106,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -125,7 +125,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", labels=["DoS", "CVE"], priority=1, @@ -135,7 +135,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.update( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -146,7 +146,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) @@ -154,7 +154,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -166,7 +166,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -181,20 +181,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.delete( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: priority = client.cloudforce_one.requests.priority.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], priority, path=["response"]) @@ -202,7 +202,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -214,7 +214,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.priority.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -229,13 +229,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): client.cloudforce_one.requests.priority.with_raw_response.get( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ class TestAsyncPriority: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -295,7 +295,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -310,7 +310,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -328,7 +328,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.create( - "", + account_identifier="", labels=["DoS", "CVE"], priority=1, requirement="DoS attacks carried out by CVEs", @@ -338,7 +338,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -350,7 +350,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -366,7 +366,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -385,7 +385,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", labels=["DoS", "CVE"], priority=1, @@ -395,7 +395,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.update( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", labels=["DoS", "CVE"], priority=1, @@ -406,7 +406,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PriorityDeleteResponse, priority, path=["response"]) @@ -414,7 +414,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -426,7 +426,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -441,20 +441,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.delete( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: priority = await async_client.cloudforce_one.requests.priority.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], priority, path=["response"]) @@ -462,7 +462,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -474,7 +474,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.priority.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -489,13 +489,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + priority_identifer="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `priority_identifer` but received ''"): await async_client.cloudforce_one.requests.priority.with_raw_response.get( - "", + priority_identifer="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/cloudforce_one/test_requests.py b/tests/api_resources/cloudforce_one/test_requests.py index 9e43e1a22b2..53ea792ef95 100644 --- a/tests/api_resources/cloudforce_one/test_requests.py +++ b/tests/api_resources/cloudforce_one/test_requests.py @@ -29,14 +29,14 @@ class TestRequests: @parametrize def test_method_create(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", request_type="Victomology", @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,13 +73,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.create( - "", + account_identifier="", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -87,7 +87,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", @@ -100,7 +100,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,20 +127,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.update( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -149,7 +149,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, completed_after=parse_datetime("2022-01-01T00:00:00Z"), @@ -166,7 +166,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -179,7 +179,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) as response: @@ -195,7 +195,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.list( - "", + account_identifier="", page=0, per_page=10, ) @@ -203,7 +203,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RequestDeleteResponse, request, path=["response"]) @@ -211,7 +211,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.delete( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -289,7 +289,7 @@ def test_path_params_constants(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: request = client.cloudforce_one.requests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -297,7 +297,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -309,7 +309,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.requests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -324,13 +324,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): client.cloudforce_one.requests.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -417,14 +417,14 @@ class TestAsyncRequests: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", request_type="Victomology", @@ -436,7 +436,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -447,7 +447,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -461,13 +461,13 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.create( - "", + account_identifier="", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -475,7 +475,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="What regions were most effected by the recent DoS?", priority="routine", @@ -488,7 +488,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -500,7 +500,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -515,20 +515,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.update( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -537,7 +537,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, completed_after=parse_datetime("2022-01-01T00:00:00Z"), @@ -554,7 +554,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) @@ -567,7 +567,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=0, per_page=10, ) as response: @@ -583,7 +583,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.list( - "", + account_identifier="", page=0, per_page=10, ) @@ -591,7 +591,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RequestDeleteResponse, request, path=["response"]) @@ -599,7 +599,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -611,7 +611,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -626,13 +626,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.delete( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -677,7 +677,7 @@ async def test_path_params_constants(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: request = await async_client.cloudforce_one.requests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Item], request, path=["response"]) @@ -685,7 +685,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -697,7 +697,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.requests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -712,13 +712,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + request_identifier="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `request_identifier` but received ''"): await async_client.cloudforce_one.requests.with_raw_response.get( - "", + request_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/d1/test_database.py b/tests/api_resources/d1/test_database.py index 68fd53cc39b..58ce4be1a90 100644 --- a/tests/api_resources/d1/test_database.py +++ b/tests/api_resources/d1/test_database.py @@ -78,7 +78,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", page=1, per_page=10, ) @@ -118,7 +118,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: database = client.d1.database.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) @@ -126,7 +126,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -138,7 +138,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -153,20 +153,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.delete( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: database = client.d1.database.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(D1, database, path=["response"]) @@ -174,7 +174,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -186,7 +186,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -201,20 +201,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.get( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_query(self, client: Cloudflare) -> None: database = client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -223,7 +223,7 @@ def test_method_query(self, client: Cloudflare) -> None: @parametrize def test_method_query_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -233,7 +233,7 @@ def test_method_query_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_query(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -246,7 +246,7 @@ def test_raw_response_query(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_query(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -262,14 +262,14 @@ def test_streaming_response_query(self, client: Cloudflare) -> None: def test_path_params_query(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.query( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -277,7 +277,7 @@ def test_path_params_query(self, client: Cloudflare) -> None: @parametrize def test_method_raw(self, client: Cloudflare) -> None: database = client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -286,7 +286,7 @@ def test_method_raw(self, client: Cloudflare) -> None: @parametrize def test_method_raw_with_all_params(self, client: Cloudflare) -> None: database = client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -296,7 +296,7 @@ def test_method_raw_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_raw(self, client: Cloudflare) -> None: response = client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -309,7 +309,7 @@ def test_raw_response_raw(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_raw(self, client: Cloudflare) -> None: with client.d1.database.with_streaming_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -325,14 +325,14 @@ def test_streaming_response_raw(self, client: Cloudflare) -> None: def test_path_params_raw(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): client.d1.database.with_raw_response.raw( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -394,7 +394,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", page=1, per_page=10, ) @@ -434,7 +434,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(DatabaseDeleteResponse, database, path=["response"]) @@ -442,7 +442,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,20 +469,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.d1.database.with_raw_response.delete( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.delete( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(D1, database, path=["response"]) @@ -490,7 +490,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -502,7 +502,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -517,20 +517,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.d1.database.with_raw_response.get( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.get( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_query(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -539,7 +539,7 @@ async def test_method_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -549,7 +549,7 @@ async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -562,7 +562,7 @@ async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -578,14 +578,14 @@ async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.d1.database.with_raw_response.query( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.query( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -593,7 +593,7 @@ async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_raw(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -602,7 +602,7 @@ async def test_method_raw(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_raw_with_all_params(self, async_client: AsyncCloudflare) -> None: database = await async_client.d1.database.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", params=["firstParam", "secondParam"], @@ -612,7 +612,7 @@ async def test_method_raw_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_raw(self, async_client: AsyncCloudflare) -> None: response = await async_client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) @@ -625,7 +625,7 @@ async def test_raw_response_raw(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_raw(self, async_client: AsyncCloudflare) -> None: async with async_client.d1.database.with_streaming_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) as response: @@ -641,14 +641,14 @@ async def test_streaming_response_raw(self, async_client: AsyncCloudflare) -> No async def test_path_params_raw(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.d1.database.with_raw_response.raw( - "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", + database_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", account_id="", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `database_id` but received ''"): await async_client.d1.database.with_raw_response.raw( - "", + database_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", sql="SELECT * FROM myTable WHERE field = ? OR field = ?;", ) diff --git a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py index 0aa48692e20..8b22e6d0ee0 100644 --- a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py @@ -21,7 +21,7 @@ class TestBytimes: @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -45,7 +45,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -57,7 +57,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.analytics.reports.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -72,13 +72,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -89,7 +89,7 @@ class TestAsyncBytimes: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ByTime], bytime, path=["response"]) @@ -97,7 +97,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.firewall.analytics.reports.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -113,7 +113,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.analytics.reports.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -140,12 +140,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.analytics.reports.bytimes.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/firewall/analytics/test_reports.py b/tests/api_resources/dns/firewall/analytics/test_reports.py index 985ac0d448f..ebdb5cad0c1 100644 --- a/tests/api_resources/dns/firewall/analytics/test_reports.py +++ b/tests/api_resources/dns/firewall/analytics/test_reports.py @@ -21,7 +21,7 @@ class TestReports: @parametrize def test_method_get(self, client: Cloudflare) -> None: report = client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Report], report, path=["response"]) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: report = client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -44,7 +44,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -56,7 +56,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.analytics.reports.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -71,13 +71,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.analytics.reports.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -88,7 +88,7 @@ class TestAsyncReports: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Report], report, path=["response"]) @@ -96,7 +96,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.firewall.analytics.reports.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", dimensions="queryType", filters="responseCode==NOERROR,queryType==A", @@ -111,7 +111,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -123,7 +123,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.analytics.reports.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -138,12 +138,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.dns.firewall.analytics.reports.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.analytics.reports.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/test_firewall.py b/tests/api_resources/dns/test_firewall.py index b1aa07bd8df..aac76b89adc 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -137,7 +137,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: firewall = client.dns.firewall.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @@ -145,7 +145,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -157,7 +157,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -172,20 +172,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.delete( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -201,7 +201,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: firewall = client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -224,7 +224,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -244,7 +244,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -267,7 +267,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -281,7 +281,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.edit( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -296,7 +296,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: firewall = client.dns.firewall.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Firewall], firewall, path=["response"]) @@ -304,7 +304,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -316,7 +316,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.firewall.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -331,13 +331,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): client.dns.firewall.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -461,7 +461,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[FirewallDeleteResponse], firewall, path=["response"]) @@ -469,7 +469,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -481,7 +481,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -496,20 +496,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.dns.firewall.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.delete( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -525,7 +525,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -548,7 +548,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -568,7 +568,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -591,7 +591,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.dns.firewall.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -605,7 +605,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.edit( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="023e105f4ecef8ad9ca31a8372d0c353", deprecate_any_requests=True, @@ -620,7 +620,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Firewall], firewall, path=["response"]) @@ -628,7 +628,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -640,7 +640,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.firewall.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -655,12 +655,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.dns.firewall.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_firewall_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_firewall_id` but received ''"): await async_client.dns.firewall.with_raw_response.get( - "", + dns_firewall_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/test_records.py b/tests/api_resources/dns/test_records.py index 55ae9e690a8..532f10ae713 100644 --- a/tests/api_resources/dns/test_records.py +++ b/tests/api_resources/dns/test_records.py @@ -182,7 +182,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -254,7 +254,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -400,7 +400,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -472,7 +472,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -774,12 +774,12 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -988,7 +988,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -1140,7 +1140,7 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -1285,7 +1285,7 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> record = client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -1492,7 +1492,7 @@ def test_path_params_create_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1504,7 +1504,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1521,7 +1521,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1537,7 +1537,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1556,7 +1556,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -1565,7 +1565,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -1576,7 +1576,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1588,7 +1588,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1605,7 +1605,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1621,7 +1621,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1640,7 +1640,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -1649,7 +1649,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -1660,7 +1660,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1672,12 +1672,12 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -1692,7 +1692,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1708,7 +1708,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1727,7 +1727,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -1736,7 +1736,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1747,7 +1747,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1759,11 +1759,11 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -1780,7 +1780,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1796,7 +1796,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1815,7 +1815,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -1824,7 +1824,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1835,7 +1835,7 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1847,7 +1847,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1864,7 +1864,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1880,7 +1880,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1899,7 +1899,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -1908,7 +1908,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -1919,7 +1919,7 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1931,13 +1931,13 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -1952,7 +1952,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1968,7 +1968,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -1987,7 +1987,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -1996,7 +1996,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2007,7 +2007,7 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2019,11 +2019,11 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -2040,7 +2040,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2056,7 +2056,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2075,7 +2075,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2084,7 +2084,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2095,7 +2095,7 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2107,7 +2107,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -2127,7 +2127,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2143,7 +2143,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2162,7 +2162,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2171,7 +2171,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2182,7 +2182,7 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2194,7 +2194,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -2223,7 +2223,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2239,7 +2239,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2258,7 +2258,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2267,7 +2267,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2278,7 +2278,7 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2291,7 +2291,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2308,7 +2308,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2325,7 +2325,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2345,7 +2345,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -2355,7 +2355,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -2367,7 +2367,7 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2379,15 +2379,15 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -2402,7 +2402,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2418,7 +2418,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2437,7 +2437,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2446,7 +2446,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2457,7 +2457,7 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2469,7 +2469,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2485,7 +2485,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2501,7 +2501,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2520,7 +2520,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -2529,7 +2529,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -2540,7 +2540,7 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2552,7 +2552,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2568,7 +2568,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2584,7 +2584,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2603,7 +2603,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -2612,7 +2612,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -2623,7 +2623,7 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2635,10 +2635,10 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -2656,7 +2656,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2672,7 +2672,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2691,7 +2691,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2700,7 +2700,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2711,7 +2711,7 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2723,7 +2723,7 @@ def test_method_update_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -2747,7 +2747,7 @@ def test_method_update_with_all_params_overload_15(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2763,7 +2763,7 @@ def test_raw_response_update_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2782,7 +2782,7 @@ def test_streaming_response_update_overload_15(self, client: Cloudflare) -> None def test_path_params_update_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -2791,7 +2791,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -2802,7 +2802,7 @@ def test_path_params_update_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2814,11 +2814,11 @@ def test_method_update_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -2834,7 +2834,7 @@ def test_method_update_with_all_params_overload_16(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2850,7 +2850,7 @@ def test_raw_response_update_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2869,7 +2869,7 @@ def test_streaming_response_update_overload_16(self, client: Cloudflare) -> None def test_path_params_update_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2878,7 +2878,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2889,7 +2889,7 @@ def test_path_params_update_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2901,7 +2901,7 @@ def test_method_update_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -2921,7 +2921,7 @@ def test_method_update_with_all_params_overload_17(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2937,7 +2937,7 @@ def test_raw_response_update_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2956,7 +2956,7 @@ def test_streaming_response_update_overload_17(self, client: Cloudflare) -> None def test_path_params_update_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -2965,7 +2965,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2976,7 +2976,7 @@ def test_path_params_update_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -2988,10 +2988,10 @@ def test_method_update_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -3009,7 +3009,7 @@ def test_method_update_with_all_params_overload_18(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3025,7 +3025,7 @@ def test_raw_response_update_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3044,7 +3044,7 @@ def test_streaming_response_update_overload_18(self, client: Cloudflare) -> None def test_path_params_update_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3053,7 +3053,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3064,7 +3064,7 @@ def test_path_params_update_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3076,7 +3076,7 @@ def test_method_update_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3092,7 +3092,7 @@ def test_method_update_with_all_params_overload_19(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3108,7 +3108,7 @@ def test_raw_response_update_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3127,7 +3127,7 @@ def test_streaming_response_update_overload_19(self, client: Cloudflare) -> None def test_path_params_update_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -3136,7 +3136,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -3147,7 +3147,7 @@ def test_path_params_update_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3160,7 +3160,7 @@ def test_method_update_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -3180,7 +3180,7 @@ def test_method_update_with_all_params_overload_20(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3197,7 +3197,7 @@ def test_raw_response_update_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3217,7 +3217,7 @@ def test_streaming_response_update_overload_20(self, client: Cloudflare) -> None def test_path_params_update_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3227,7 +3227,7 @@ def test_path_params_update_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3247,8 +3247,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: record = client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", comment={ - "present": "string", - "absent": "string", + "present": "present", + "absent": "absent", "exact": "Hello, world", "contains": "ello, worl", "startswith": "Hello, w", @@ -3310,7 +3310,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: record = client.dns.records.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) @@ -3318,7 +3318,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3330,7 +3330,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -3345,13 +3345,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.delete( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3359,7 +3359,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3371,7 +3371,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3388,7 +3388,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3404,7 +3404,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3423,7 +3423,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -3432,7 +3432,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -3443,7 +3443,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3455,7 +3455,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3472,7 +3472,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3488,7 +3488,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3507,7 +3507,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -3516,7 +3516,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -3527,7 +3527,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3539,12 +3539,12 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -3559,7 +3559,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3575,7 +3575,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3594,7 +3594,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3603,7 +3603,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3614,7 +3614,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3626,11 +3626,11 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -3647,7 +3647,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3663,7 +3663,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3682,7 +3682,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3691,7 +3691,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3702,7 +3702,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3714,7 +3714,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3731,7 +3731,7 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3747,7 +3747,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3766,7 +3766,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -3775,7 +3775,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -3786,7 +3786,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3798,13 +3798,13 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -3819,7 +3819,7 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3835,7 +3835,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3854,7 +3854,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3863,7 +3863,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3874,7 +3874,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3886,11 +3886,11 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -3907,7 +3907,7 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3923,7 +3923,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3942,7 +3942,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -3951,7 +3951,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3962,7 +3962,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -3974,7 +3974,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -3994,7 +3994,7 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4010,7 +4010,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4029,7 +4029,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4038,7 +4038,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4049,7 +4049,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4061,7 +4061,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -4090,7 +4090,7 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4106,7 +4106,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4125,7 +4125,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4134,7 +4134,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4145,7 +4145,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4158,7 +4158,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4175,7 +4175,7 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4192,7 +4192,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4212,7 +4212,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -4222,7 +4222,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -4234,7 +4234,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4246,15 +4246,15 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -4269,7 +4269,7 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4285,7 +4285,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4304,7 +4304,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4313,7 +4313,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4324,7 +4324,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4336,7 +4336,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4352,7 +4352,7 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4368,7 +4368,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4387,7 +4387,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -4396,7 +4396,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -4407,7 +4407,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4419,7 +4419,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4435,7 +4435,7 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4451,7 +4451,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4470,7 +4470,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -4479,7 +4479,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -4490,7 +4490,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4502,10 +4502,10 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -4523,7 +4523,7 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4539,7 +4539,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4558,7 +4558,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4567,7 +4567,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4578,7 +4578,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4590,7 +4590,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -4614,7 +4614,7 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4630,7 +4630,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4649,7 +4649,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -4658,7 +4658,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -4669,7 +4669,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4681,11 +4681,11 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -4701,7 +4701,7 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4717,7 +4717,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4736,7 +4736,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4745,7 +4745,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4756,7 +4756,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4768,7 +4768,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -4788,7 +4788,7 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4804,7 +4804,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4823,7 +4823,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4832,7 +4832,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4843,7 +4843,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4855,10 +4855,10 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -4876,7 +4876,7 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4892,7 +4892,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4911,7 +4911,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -4920,7 +4920,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -4931,7 +4931,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4943,7 +4943,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4959,7 +4959,7 @@ def test_method_edit_with_all_params_overload_19(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4975,7 +4975,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -4994,7 +4994,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -5003,7 +5003,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -5014,7 +5014,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5027,7 +5027,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> None: record = client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -5047,7 +5047,7 @@ def test_method_edit_with_all_params_overload_20(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5064,7 +5064,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5084,7 +5084,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -5094,7 +5094,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -5143,7 +5143,7 @@ def test_path_params_export(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: record = client.dns.records.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -5151,7 +5151,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -5163,7 +5163,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.records.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -5178,13 +5178,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): client.dns.records.with_raw_response.get( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -5449,7 +5449,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -5521,7 +5521,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -5667,7 +5667,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -5739,7 +5739,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -6041,12 +6041,12 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -6255,7 +6255,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -6407,7 +6407,7 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -6552,7 +6552,7 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy record = await async_client.dns.records.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -6759,7 +6759,7 @@ async def test_path_params_create_overload_20(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6771,7 +6771,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6788,7 +6788,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6804,7 +6804,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6823,7 +6823,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -6832,7 +6832,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -6843,7 +6843,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6855,7 +6855,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6872,7 +6872,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6888,7 +6888,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6907,7 +6907,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -6916,7 +6916,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -6927,7 +6927,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -6939,12 +6939,12 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -6959,7 +6959,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -6975,7 +6975,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -6994,7 +6994,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7003,7 +7003,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7014,7 +7014,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7026,11 +7026,11 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -7047,7 +7047,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7063,7 +7063,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7082,7 +7082,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7091,7 +7091,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7102,7 +7102,7 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7114,7 +7114,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7131,7 +7131,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7147,7 +7147,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7166,7 +7166,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -7175,7 +7175,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -7186,7 +7186,7 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7198,13 +7198,13 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -7219,7 +7219,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7235,7 +7235,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7254,7 +7254,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7263,7 +7263,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7274,7 +7274,7 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7286,11 +7286,11 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -7307,7 +7307,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7323,7 +7323,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7342,7 +7342,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7351,7 +7351,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7362,7 +7362,7 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7374,7 +7374,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -7394,7 +7394,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7410,7 +7410,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7429,7 +7429,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7438,7 +7438,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7449,7 +7449,7 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7461,7 +7461,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -7490,7 +7490,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7506,7 +7506,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7525,7 +7525,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7534,7 +7534,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7545,7 +7545,7 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7558,7 +7558,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7575,7 +7575,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7592,7 +7592,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7612,7 +7612,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl async def test_path_params_update_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -7622,7 +7622,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -7634,7 +7634,7 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7646,15 +7646,15 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -7669,7 +7669,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7685,7 +7685,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7704,7 +7704,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl async def test_path_params_update_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7713,7 +7713,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7724,7 +7724,7 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7736,7 +7736,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7752,7 +7752,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7768,7 +7768,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7787,7 +7787,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl async def test_path_params_update_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -7796,7 +7796,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -7807,7 +7807,7 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7819,7 +7819,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7835,7 +7835,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7851,7 +7851,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7870,7 +7870,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl async def test_path_params_update_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -7879,7 +7879,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -7890,7 +7890,7 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7902,10 +7902,10 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -7923,7 +7923,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7939,7 +7939,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7958,7 +7958,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl async def test_path_params_update_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -7967,7 +7967,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -7978,7 +7978,7 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -7990,7 +7990,7 @@ async def test_method_update_overload_15(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -8014,7 +8014,7 @@ async def test_method_update_with_all_params_overload_15(self, async_client: Asy @parametrize async def test_raw_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -8030,7 +8030,7 @@ async def test_raw_response_update_overload_15(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -8049,7 +8049,7 @@ async def test_streaming_response_update_overload_15(self, async_client: AsyncCl async def test_path_params_update_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -8058,7 +8058,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -8069,7 +8069,7 @@ async def test_path_params_update_overload_15(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8081,11 +8081,11 @@ async def test_method_update_overload_16(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -8101,7 +8101,7 @@ async def test_method_update_with_all_params_overload_16(self, async_client: Asy @parametrize async def test_raw_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8117,7 +8117,7 @@ async def test_raw_response_update_overload_16(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8136,7 +8136,7 @@ async def test_streaming_response_update_overload_16(self, async_client: AsyncCl async def test_path_params_update_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8145,7 +8145,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8156,7 +8156,7 @@ async def test_path_params_update_overload_16(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8168,7 +8168,7 @@ async def test_method_update_overload_17(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -8188,7 +8188,7 @@ async def test_method_update_with_all_params_overload_17(self, async_client: Asy @parametrize async def test_raw_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8204,7 +8204,7 @@ async def test_raw_response_update_overload_17(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8223,7 +8223,7 @@ async def test_streaming_response_update_overload_17(self, async_client: AsyncCl async def test_path_params_update_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8232,7 +8232,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8243,7 +8243,7 @@ async def test_path_params_update_overload_17(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8255,10 +8255,10 @@ async def test_method_update_overload_18(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -8276,7 +8276,7 @@ async def test_method_update_with_all_params_overload_18(self, async_client: Asy @parametrize async def test_raw_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8292,7 +8292,7 @@ async def test_raw_response_update_overload_18(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8311,7 +8311,7 @@ async def test_streaming_response_update_overload_18(self, async_client: AsyncCl async def test_path_params_update_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8320,7 +8320,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8331,7 +8331,7 @@ async def test_path_params_update_overload_18(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8343,7 +8343,7 @@ async def test_method_update_overload_19(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8359,7 +8359,7 @@ async def test_method_update_with_all_params_overload_19(self, async_client: Asy @parametrize async def test_raw_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8375,7 +8375,7 @@ async def test_raw_response_update_overload_19(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8394,7 +8394,7 @@ async def test_streaming_response_update_overload_19(self, async_client: AsyncCl async def test_path_params_update_overload_19(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -8403,7 +8403,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -8414,7 +8414,7 @@ async def test_path_params_update_overload_19(self, async_client: AsyncCloudflar @parametrize async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8427,7 +8427,7 @@ async def test_method_update_overload_20(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -8447,7 +8447,7 @@ async def test_method_update_with_all_params_overload_20(self, async_client: Asy @parametrize async def test_raw_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8464,7 +8464,7 @@ async def test_raw_response_update_overload_20(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8484,7 +8484,7 @@ async def test_streaming_response_update_overload_20(self, async_client: AsyncCl async def test_path_params_update_overload_20(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8494,7 +8494,7 @@ async def test_path_params_update_overload_20(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.update( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8514,8 +8514,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) record = await async_client.dns.records.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", comment={ - "present": "string", - "absent": "string", + "present": "present", + "absent": "absent", "exact": "Hello, world", "contains": "ello, worl", "startswith": "Hello, w", @@ -8577,7 +8577,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RecordDeleteResponse], record, path=["response"]) @@ -8585,7 +8585,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -8597,7 +8597,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -8612,13 +8612,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.delete( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -8626,7 +8626,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8638,7 +8638,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8655,7 +8655,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8671,7 +8671,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8690,7 +8690,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="198.51.100.4", name="example.com", @@ -8699,7 +8699,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="198.51.100.4", name="example.com", @@ -8710,7 +8710,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8722,7 +8722,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8739,7 +8739,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8755,7 +8755,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8774,7 +8774,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="2400:cb00:2049::1", name="example.com", @@ -8783,7 +8783,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="2400:cb00:2049::1", name="example.com", @@ -8794,7 +8794,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8806,12 +8806,12 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "flags": 1, "tag": "issue", - "value": "string", + "value": "value", }, name="example.com", type="CAA", @@ -8826,7 +8826,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8842,7 +8842,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8861,7 +8861,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8870,7 +8870,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8881,7 +8881,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8893,11 +8893,11 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 8, - "certificate": "string", + "certificate": "certificate", "key_tag": 1, "type": 9, }, @@ -8914,7 +8914,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8930,7 +8930,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8949,7 +8949,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -8958,7 +8958,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -8969,7 +8969,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -8981,7 +8981,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -8998,7 +8998,7 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -9014,7 +9014,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -9033,7 +9033,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content={}, name="example.com", @@ -9042,7 +9042,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content={}, name="example.com", @@ -9053,7 +9053,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9065,13 +9065,13 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 5, "flags": 1, "protocol": 3, - "public_key": "string", + "public_key": "public_key", }, name="example.com", type="DNSKEY", @@ -9086,7 +9086,7 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9102,7 +9102,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9121,7 +9121,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9130,7 +9130,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9141,7 +9141,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9153,11 +9153,11 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 3, - "digest": "string", + "digest": "digest", "digest_type": 1, "key_tag": 1, }, @@ -9174,7 +9174,7 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9190,7 +9190,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9209,7 +9209,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9218,7 +9218,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9229,7 +9229,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9241,7 +9241,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -9261,7 +9261,7 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9277,7 +9277,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9296,7 +9296,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9305,7 +9305,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9316,7 +9316,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9328,7 +9328,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "altitude": 0, @@ -9357,7 +9357,7 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9373,7 +9373,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9392,7 +9392,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9401,7 +9401,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9412,7 +9412,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9425,7 +9425,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9442,7 +9442,7 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9459,7 +9459,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9479,7 +9479,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="mx.example.com", name="example.com", @@ -9489,7 +9489,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="mx.example.com", name="example.com", @@ -9501,7 +9501,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9513,15 +9513,15 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "flags": "string", + "flags": "flags", "order": 100, "preference": 10, - "regex": "string", - "replacement": "string", - "service": "string", + "regex": "regex", + "replacement": "replacement", + "service": "service", }, name="example.com", type="NAPTR", @@ -9536,7 +9536,7 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9552,7 +9552,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9571,7 +9571,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9580,7 +9580,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9591,7 +9591,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9603,7 +9603,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9619,7 +9619,7 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9635,7 +9635,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9654,7 +9654,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="ns1.example.com", name="example.com", @@ -9663,7 +9663,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="ns1.example.com", name="example.com", @@ -9674,7 +9674,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9686,7 +9686,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9702,7 +9702,7 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9718,7 +9718,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9737,7 +9737,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example.com", name="example.com", @@ -9746,7 +9746,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example.com", name="example.com", @@ -9757,7 +9757,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9769,10 +9769,10 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 0, "selector": 0, "usage": 3, @@ -9790,7 +9790,7 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9806,7 +9806,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9825,7 +9825,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -9834,7 +9834,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9845,7 +9845,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9857,7 +9857,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "name": "example.com", @@ -9881,7 +9881,7 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9897,7 +9897,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9916,7 +9916,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="_sip._tcp.example.com", @@ -9925,7 +9925,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="_sip._tcp.example.com", @@ -9936,7 +9936,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9948,11 +9948,11 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "algorithm": 2, - "fingerprint": "string", + "fingerprint": "fingerprint", "type": 1, }, name="example.com", @@ -9968,7 +9968,7 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -9984,7 +9984,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10003,7 +10003,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10012,7 +10012,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10023,7 +10023,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10035,7 +10035,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "priority": 1, @@ -10055,7 +10055,7 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10071,7 +10071,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10090,7 +10090,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10099,7 +10099,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10110,7 +10110,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10122,10 +10122,10 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ - "certificate": "string", + "certificate": "certificate", "matching_type": 1, "selector": 0, "usage": 0, @@ -10143,7 +10143,7 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10159,7 +10159,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10178,7 +10178,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10187,7 +10187,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10198,7 +10198,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10210,7 +10210,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_19(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10226,7 +10226,7 @@ async def test_method_edit_with_all_params_overload_19(self, async_client: Async @parametrize async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10242,7 +10242,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10261,7 +10261,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", content="example text content", name="example.com", @@ -10270,7 +10270,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", content="example text content", name="example.com", @@ -10281,7 +10281,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10294,7 +10294,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_20(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={ "target": "http://example.com/example.html", @@ -10314,7 +10314,7 @@ async def test_method_edit_with_all_params_overload_20(self, async_client: Async @parametrize async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10331,7 +10331,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10351,7 +10351,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", data={}, name="example.com", @@ -10361,7 +10361,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.edit( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", data={}, name="example.com", @@ -10410,7 +10410,7 @@ async def test_path_params_export(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: record = await async_client.dns.records.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Record], record, path=["response"]) @@ -10418,7 +10418,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -10430,7 +10430,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.records.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -10445,13 +10445,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.records.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + dns_record_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dns_record_id` but received ''"): await async_client.dns.records.with_raw_response.get( - "", + dns_record_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/dns/test_settings.py b/tests/api_resources/dns/test_settings.py index c0dd59c2aa2..4a2eee8e82f 100644 --- a/tests/api_resources/dns/test_settings.py +++ b/tests/api_resources/dns/test_settings.py @@ -21,7 +21,7 @@ class TestSettings: @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.dns.settings.edit( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -29,7 +29,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.dns.settings.edit( - account_id="string", + account_id="account_id", zone_defaults={ "foundation_dns": False, "multi_provider": False, @@ -54,7 +54,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.dns.settings.with_streaming_response.edit( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,14 +86,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -101,7 +101,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: setting = client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -109,7 +109,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.dns.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -141,7 +141,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) @@ -152,7 +152,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.edit( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -160,7 +160,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.edit( - account_id="string", + account_id="account_id", zone_defaults={ "foundation_dns": False, "multi_provider": False, @@ -185,7 +185,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -197,7 +197,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.settings.with_streaming_response.edit( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,14 +217,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.settings.with_raw_response.edit( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="HTTP 422 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -232,7 +232,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.dns.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -240,7 +240,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -252,7 +252,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.dns.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -272,5 +272,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.dns.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py index 02340cc04b1..9e703603fcc 100644 --- a/tests/api_resources/durable_objects/namespaces/test_objects.py +++ b/tests/api_resources/durable_objects/namespaces/test_objects.py @@ -21,7 +21,7 @@ class TestObjects: @parametrize def test_method_list(self, client: Cloudflare) -> None: object_ = client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncCursorLimitPagination[DurableObject], object_, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: object_ = client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, @@ -39,7 +39,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -51,7 +51,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.durable_objects.namespaces.objects.with_streaming_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -66,13 +66,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.durable_objects.namespaces.objects.with_raw_response.list( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -83,7 +83,7 @@ class TestAsyncObjects: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: object_ = await async_client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncCursorLimitPagination[DurableObject], object_, path=["response"]) @@ -91,7 +91,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: object_ = await async_client.durable_objects.namespaces.objects.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, @@ -101,7 +101,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -113,7 +113,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.durable_objects.namespaces.objects.with_streaming_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -128,12 +128,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.durable_objects.namespaces.objects.with_raw_response.list( - "5fd1cafff895419c8bcc647fc64ab8f0", + id="5fd1cafff895419c8bcc647fc64ab8f0", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.durable_objects.namespaces.objects.with_raw_response.list( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/email_routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py index bae9a887033..3c894ee8d54 100644 --- a/tests/api_resources/email_routing/rules/test_catch_alls.py +++ b/tests/api_resources/email_routing/rules/test_catch_alls.py @@ -20,7 +20,7 @@ class TestCatchAlls: @parametrize def test_method_update(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: catch_all = client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -65,7 +65,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.email_routing.rules.catch_alls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -78,7 +78,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.email_routing.rules.catch_alls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) as response: @@ -94,7 +94,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.catch_alls.with_raw_response.update( - "", + zone_identifier="", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -144,7 +144,7 @@ class TestAsyncCatchAlls: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -153,7 +153,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: catch_all = await async_client.email_routing.rules.catch_alls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -189,7 +189,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.catch_alls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) @@ -202,7 +202,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.catch_alls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) as response: @@ -218,7 +218,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.catch_alls.with_raw_response.update( - "", + zone_identifier="", actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}], matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}], ) diff --git a/tests/api_resources/email_routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py index 092f927fc8a..1f7a9438ef6 100644 --- a/tests/api_resources/email_routing/test_addresses.py +++ b/tests/api_resources/email_routing/test_addresses.py @@ -21,7 +21,7 @@ class TestAddresses: @parametrize def test_method_create(self, client: Cloudflare) -> None: address = client.email_routing.addresses.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) @@ -41,7 +41,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) as response: assert not response.is_closed @@ -56,21 +56,21 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.create( - "", + account_identifier="", email="user@example.com", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: address = client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Address], address, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: address = client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="asc", page=1, per_page=5, @@ -81,7 +81,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,13 +106,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.list( - "", + account_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: address = client.email_routing.addresses.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -120,7 +120,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -147,7 +147,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -155,14 +155,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): client.email_routing.addresses.with_raw_response.delete( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: address = client.email_routing.addresses.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -170,7 +170,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.addresses.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -197,7 +197,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -205,7 +205,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): client.email_routing.addresses.with_raw_response.get( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ class TestAsyncAddresses: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -224,7 +224,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) @@ -236,7 +236,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", email="user@example.com", ) as response: assert not response.is_closed @@ -251,21 +251,21 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.create( - "", + account_identifier="", email="user@example.com", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Address], address, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="asc", page=1, per_page=5, @@ -276,7 +276,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -287,7 +287,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -301,13 +301,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.list( - "", + account_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -315,7 +315,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -327,7 +327,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -342,7 +342,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -350,14 +350,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): await async_client.email_routing.addresses.with_raw_response.delete( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: address = await async_client.email_routing.addresses.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Address], address, path=["response"]) @@ -365,7 +365,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -377,7 +377,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.addresses.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -392,7 +392,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.email_routing.addresses.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + destination_address_identifier="ea95132c15732412d22c1476fa83f27a", account_identifier="", ) @@ -400,6 +400,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''" ): await async_client.email_routing.addresses.with_raw_response.get( - "", + destination_address_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/email_routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py index 0c130d6cce5..489ef091576 100644 --- a/tests/api_resources/email_routing/test_rules.py +++ b/tests/api_resources/email_routing/test_rules.py @@ -21,7 +21,7 @@ class TestRules: @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -71,7 +71,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -124,7 +124,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -178,7 +178,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -235,7 +235,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.create( - "", + zone_identifier="", actions=[ { "type": "forward", @@ -284,7 +284,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -335,7 +335,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -389,7 +389,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -444,7 +444,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -502,7 +502,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", actions=[ { @@ -551,7 +551,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): client.email_routing.rules.with_raw_response.update( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -601,14 +601,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, page=1, per_page=5, @@ -618,7 +618,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -629,7 +629,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -643,13 +643,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.email_routing.rules.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -657,7 +657,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -669,7 +669,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -684,20 +684,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): client.email_routing.rules.with_raw_response.delete( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.email_routing.rules.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -705,7 +705,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -717,7 +717,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.email_routing.rules.with_streaming_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -732,13 +732,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): client.email_routing.rules.with_raw_response.get( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -749,7 +749,7 @@ class TestAsyncRules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -799,7 +799,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -852,7 +852,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -906,7 +906,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { "type": "forward", @@ -963,7 +963,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.create( - "", + zone_identifier="", actions=[ { "type": "forward", @@ -1012,7 +1012,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1063,7 +1063,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1117,7 +1117,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1172,7 +1172,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1230,7 +1230,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.update( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", actions=[ { @@ -1279,7 +1279,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.update( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1329,14 +1329,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[EmailRoutingRule], rule, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, page=1, per_page=5, @@ -1346,7 +1346,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -1357,7 +1357,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1371,13 +1371,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -1385,7 +1385,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1397,7 +1397,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1412,20 +1412,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.delete( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.delete( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.email_routing.rules.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EmailRoutingRule], rule, path=["response"]) @@ -1433,7 +1433,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1445,7 +1445,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.rules.with_streaming_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1460,12 +1460,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.get( - "a7e6fb77503c41d8a7f3113c6918f10c", + rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"): await async_client.email_routing.rules.with_raw_response.get( - "", + rule_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/event_notifications/r2/configuration/test_queues.py b/tests/api_resources/event_notifications/r2/configuration/test_queues.py index a0fd0bc166d..f2d278015d9 100644 --- a/tests/api_resources/event_notifications/r2/configuration/test_queues.py +++ b/tests/api_resources/event_notifications/r2/configuration/test_queues.py @@ -23,7 +23,7 @@ class TestQueues: @parametrize def test_method_update(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -32,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", rules=[ @@ -58,7 +58,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -71,7 +71,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -87,21 +87,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -109,7 +109,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: queue = client.event_notifications.r2.configuration.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -147,21 +147,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -173,7 +173,7 @@ class TestAsyncQueues: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", rules=[ @@ -208,7 +208,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -221,7 +221,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -237,21 +237,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -259,7 +259,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: queue = await async_client.event_notifications.r2.configuration.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -268,7 +268,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -281,7 +281,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -297,21 +297,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.event_notifications.r2.configuration.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", bucket_name="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/event_notifications/r2/test_configuration.py b/tests/api_resources/event_notifications/r2/test_configuration.py index 0b4dd17ff6f..0ca03d9fc9f 100644 --- a/tests/api_resources/event_notifications/r2/test_configuration.py +++ b/tests/api_resources/event_notifications/r2/test_configuration.py @@ -20,7 +20,7 @@ class TestConfiguration: @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.event_notifications.r2.configuration.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.event_notifications.r2.configuration.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.event_notifications.r2.configuration.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncConfiguration: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.event_notifications.r2.configuration.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.event_notifications.r2.configuration.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.event_notifications.r2.configuration.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + bucket_name="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.event_notifications.r2.configuration.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py index cbd750fda04..1ae82d79762 100644 --- a/tests/api_resources/firewall/test_access_rules.py +++ b/tests/api_resources/firewall/test_access_rules.py @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -67,7 +67,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -91,14 +91,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncV4PagePaginationArray[object], access_rule, path=["response"]) @@ -106,7 +106,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( - account_id="string", + account_id="account_id", direction="desc", egs_pagination={ "json": { @@ -131,7 +131,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -143,7 +143,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -163,15 +163,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -179,8 +179,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -188,8 +188,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -201,8 +201,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,24 +217,24 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.firewall.access_rules.with_raw_response.delete( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -242,13 +242,13 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.edit( - {}, + identifier={}, configuration={ "target": "ip", "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -257,10 +257,10 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -272,10 +272,10 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -290,7 +290,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", account_id="", @@ -298,18 +298,18 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -317,8 +317,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -326,8 +326,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -339,8 +339,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -355,14 +355,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.firewall.access_rules.with_raw_response.get( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) @@ -375,7 +375,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -388,7 +388,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -399,7 +399,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -413,7 +413,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.firewall.access_rules.with_streaming_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -437,14 +437,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.firewall.access_rules.with_raw_response.create( configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncV4PagePaginationArray[object], access_rule, path=["response"]) @@ -452,7 +452,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( - account_id="string", + account_id="account_id", direction="desc", egs_pagination={ "json": { @@ -477,7 +477,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -489,7 +489,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -509,15 +509,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -525,8 +525,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -534,8 +534,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -547,8 +547,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -563,24 +563,24 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.delete( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.delete( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -588,13 +588,13 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.edit( - {}, + identifier={}, configuration={ "target": "ip", "value": "198.51.100.4", }, mode="challenge", - account_id="string", + account_id="account_id", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -603,10 +603,10 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -618,10 +618,10 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -636,7 +636,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", account_id="", @@ -644,18 +644,18 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.edit( - {}, + identifier={}, configuration={}, mode="challenge", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -663,8 +663,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -672,8 +672,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) assert response.is_closed is True @@ -685,8 +685,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.access_rules.with_streaming_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -701,12 +701,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.get( - {}, + identifier={}, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.access_rules.with_raw_response.get( - {}, - account_id="string", + identifier={}, + account_id="account_id", ) diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py index 45a8768e630..78477626c3e 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -26,7 +26,7 @@ class TestLockdowns: @parametrize def test_method_create(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -96,7 +96,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -113,14 +113,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -128,14 +128,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", created_on=parse_datetime("2014-01-01T05:20:00.12345Z"), description="endpoints", description_search="endpoints", @@ -153,7 +153,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -164,7 +164,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -178,13 +178,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) @@ -192,7 +192,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -204,7 +204,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -219,20 +219,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.lockdowns.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,13 +267,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.lockdowns.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ class TestAsyncLockdowns: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -294,7 +294,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -307,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -323,7 +323,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -331,7 +331,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -341,7 +341,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -355,7 +355,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -372,14 +372,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -387,14 +387,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Lockdown], lockdown, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", created_on=parse_datetime("2014-01-01T05:20:00.12345Z"), description="endpoints", description_search="endpoints", @@ -412,7 +412,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -423,7 +423,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -437,13 +437,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LockdownDeleteResponse], lockdown, path=["response"]) @@ -451,7 +451,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -463,7 +463,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -478,20 +478,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Lockdown, lockdown, path=["response"]) @@ -499,7 +499,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -511,7 +511,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.lockdowns.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -526,12 +526,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.lockdowns.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.lockdowns.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py index 4864bb5a5fa..cefdccf0ace 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -29,7 +29,7 @@ class TestRules: def test_method_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -40,7 +40,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -80,7 +80,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -125,14 +125,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -141,7 +141,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) @@ -150,7 +150,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b60", action="block", description="mir", @@ -165,7 +165,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -177,7 +177,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,14 +192,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -253,7 +253,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -265,7 +265,7 @@ def test_method_edit(self, client: Cloudflare) -> None: def test_raw_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -280,7 +280,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: def test_streaming_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -298,14 +298,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.rules.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -314,7 +314,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -324,7 +324,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rule = client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", query_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -335,7 +335,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -348,7 +348,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.firewall.rules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) as response: assert not response.is_closed @@ -364,14 +364,14 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_id` but received ''"): client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="", query_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.rules.with_raw_response.get( - "", + zone_identifier="", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -384,7 +384,7 @@ class TestAsyncRules: async def test_method_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -395,7 +395,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -409,7 +409,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -426,7 +426,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -435,7 +435,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -447,7 +447,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -462,7 +462,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -480,14 +480,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -496,7 +496,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b60", action="block", description="mir", @@ -520,7 +520,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -532,7 +532,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -547,14 +547,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -564,7 +564,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -577,7 +577,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -593,13 +593,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -608,7 +608,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -620,7 +620,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -635,7 +635,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -653,14 +653,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b60", + id="372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.rules.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -669,7 +669,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -679,7 +679,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rule = await async_client.firewall.rules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", query_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -690,7 +690,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) @@ -703,7 +703,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.firewall.rules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) as response: assert not response.is_closed @@ -719,13 +719,13 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `path_id` but received ''"): await async_client.firewall.rules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", path_id="", query_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.rules.with_raw_response.get( - "", + zone_identifier="", path_id="372e67954025e0ba6aaa6d586b9e0b60", ) diff --git a/tests/api_resources/firewall/test_ua_rules.py b/tests/api_resources/firewall/test_ua_rules.py index 2397df21b87..669f41a8dc8 100644 --- a/tests/api_resources/firewall/test_ua_rules.py +++ b/tests/api_resources/firewall/test_ua_rules.py @@ -28,7 +28,7 @@ class TestUARules: @parametrize def test_method_create(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -74,7 +74,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -84,7 +84,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -98,7 +98,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -115,14 +115,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -130,14 +130,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", description_search="abusive", page=1, @@ -149,7 +149,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -160,7 +160,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,13 +174,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) @@ -188,7 +188,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -200,7 +200,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -215,20 +215,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ua_rule = client.firewall.ua_rules.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) @@ -236,7 +236,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -248,7 +248,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.ua_rules.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -263,13 +263,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.ua_rules.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -281,7 +281,7 @@ class TestAsyncUARules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(UARuleCreateResponse, ua_rule, path=["response"]) @@ -290,7 +290,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -319,7 +319,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -327,7 +327,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -337,7 +337,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -351,7 +351,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -368,14 +368,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -383,14 +383,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[UARuleListResponse], ua_rule, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="abusive", description_search="abusive", page=1, @@ -402,7 +402,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -413,7 +413,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -427,13 +427,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleDeleteResponse, ua_rule, path=["response"]) @@ -441,7 +441,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -453,7 +453,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -468,20 +468,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ua_rule = await async_client.firewall.ua_rules.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(UARuleGetResponse, ua_rule, path=["response"]) @@ -489,7 +489,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -501,7 +501,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.ua_rules.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -516,12 +516,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.ua_rules.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.ua_rules.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py index b07aff7ed9d..ced79a7799f 100644 --- a/tests/api_resources/firewall/waf/packages/test_groups.py +++ b/tests/api_resources/firewall/waf/packages/test_groups.py @@ -25,7 +25,7 @@ class TestGroups: @parametrize def test_method_list(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Group], group, path=["response"]) @@ -33,7 +33,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", @@ -49,7 +49,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -61,7 +61,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -76,20 +76,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -98,7 +98,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -108,7 +108,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -121,7 +121,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -137,21 +137,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.edit( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -159,7 +159,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: group = client.firewall.waf.packages.groups.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -168,7 +168,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -181,7 +181,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.groups.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -197,21 +197,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.firewall.waf.packages.groups.with_raw_response.get( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -223,7 +223,7 @@ class TestAsyncGroups: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Group], group, path=["response"]) @@ -231,7 +231,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", @@ -247,7 +247,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -259,7 +259,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -274,20 +274,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -296,7 +296,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -306,7 +306,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -319,7 +319,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -335,21 +335,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.edit( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -357,7 +357,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: group = await async_client.firewall.waf.packages.groups.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -366,7 +366,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -379,7 +379,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.groups.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -395,21 +395,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + group_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.firewall.waf.packages.groups.with_raw_response.get( - "", + group_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py index 5936030bd50..627ebc309fb 100644 --- a/tests/api_resources/firewall/waf/packages/test_rules.py +++ b/tests/api_resources/firewall/waf/packages/test_rules.py @@ -25,7 +25,7 @@ class TestRules: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @@ -33,7 +33,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="SQL injection prevention for SELECT statements", direction="desc", @@ -43,14 +43,14 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: order="priority", page=1, per_page=5, - priority="string", + priority="priority", ) assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -62,7 +62,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -77,20 +77,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -99,7 +99,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -109,7 +109,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -122,7 +122,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -138,21 +138,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -160,7 +160,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.firewall.waf.packages.rules.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -169,7 +169,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -182,7 +182,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.rules.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -198,21 +198,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.firewall.waf.packages.rules.with_raw_response.get( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -224,7 +224,7 @@ class TestAsyncRules: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @@ -232,7 +232,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", description="SQL injection prevention for SELECT statements", direction="desc", @@ -242,14 +242,14 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) order="priority", page=1, per_page=5, - priority="string", + priority="priority", ) assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -261,7 +261,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -276,20 +276,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.list( - "a25a9a7e9c00afc1fb2e0245519d725b", + package_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.list( - "", + package_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -298,7 +298,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", mode="on", @@ -308,7 +308,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -321,7 +321,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -337,21 +337,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -359,7 +359,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.waf.packages.rules.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -368,7 +368,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) @@ -381,7 +381,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.rules.with_streaming_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) as response: @@ -397,21 +397,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `package_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.get( - "a25a9a7e9c00afc1fb2e0245519d725b", + rule_id="a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.firewall.waf.packages.rules.with_raw_response.get( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", package_id="a25a9a7e9c00afc1fb2e0245519d725b", ) diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py index 8a11a0e684f..aecf521b556 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -25,7 +25,7 @@ class TestOverrides: @parametrize def test_method_create(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Override, override, path=["response"]) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -47,7 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -63,7 +63,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -81,7 +81,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -95,7 +95,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -112,14 +112,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -127,14 +127,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[Override], override, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=5, ) @@ -143,7 +143,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -154,7 +154,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -168,13 +168,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) @@ -182,7 +182,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -194,7 +194,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -209,20 +209,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Override, override, path=["response"]) @@ -230,7 +230,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -242,7 +242,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.overrides.with_streaming_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -257,13 +257,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.firewall.waf.overrides.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -275,7 +275,7 @@ class TestAsyncOverrides: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Override, override, path=["response"]) @@ -284,7 +284,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -297,7 +297,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -313,7 +313,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -321,7 +321,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -331,7 +331,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -345,7 +345,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -362,14 +362,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.update( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -377,14 +377,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[Override], override, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=5, ) @@ -393,7 +393,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -404,7 +404,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -418,13 +418,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OverrideDeleteResponse], override, path=["response"]) @@ -432,7 +432,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -444,7 +444,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -459,20 +459,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.delete( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Override, override, path=["response"]) @@ -480,7 +480,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -492,7 +492,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.overrides.with_streaming_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -507,12 +507,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.get( - "de677e5818985db1285d0e80225f06e5", + id="de677e5818985db1285d0e80225f06e5", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.firewall.waf.overrides.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/firewall/waf/test_packages.py b/tests/api_resources/firewall/waf/test_packages.py index 9ce8631baf8..b93a426e71f 100644 --- a/tests/api_resources/firewall/waf/test_packages.py +++ b/tests/api_resources/firewall/waf/test_packages.py @@ -22,7 +22,7 @@ class TestPackages: @parametrize def test_method_list(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", name="USER", @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.waf.packages.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,13 +71,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.packages.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: package = client.firewall.waf.packages.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PackageGetResponse, package, path=["response"]) @@ -85,7 +85,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -97,7 +97,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.waf.packages.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -112,13 +112,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.firewall.waf.packages.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ class TestAsyncPackages: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[PackageListResponse], package, path=["response"]) @@ -138,7 +138,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", match="any", name="USER", @@ -152,7 +152,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -164,7 +164,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -179,13 +179,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.packages.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: package = await async_client.firewall.waf.packages.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PackageGetResponse, package, path=["response"]) @@ -193,7 +193,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -205,7 +205,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.firewall.waf.packages.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -220,12 +220,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.firewall.waf.packages.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.firewall.waf.packages.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py index 8e270873849..8377cb4f89d 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -104,7 +104,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) @@ -112,7 +112,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -124,7 +124,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -139,20 +139,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.previews.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: preview = client.healthchecks.previews.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, preview, path=["response"]) @@ -160,7 +160,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -172,7 +172,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.healthchecks.previews.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -187,13 +187,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.previews.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewDeleteResponse, preview, path=["response"]) @@ -293,7 +293,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -305,7 +305,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.previews.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -320,20 +320,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.healthchecks.previews.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, preview, path=["response"]) @@ -341,7 +341,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -353,7 +353,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.previews.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -368,12 +368,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.previews.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py index 7a3a570b024..60abcaf4022 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -24,7 +24,7 @@ class TestTLS: @parametrize def test_method_update(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -48,7 +48,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -65,7 +65,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.hostnames.settings.tls.with_raw_response.update( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -82,7 +82,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -91,7 +91,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -104,7 +104,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) as response: @@ -120,14 +120,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.hostnames.settings.tls.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -135,7 +135,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: tls = client.hostnames.settings.tls.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) @@ -143,7 +143,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -155,7 +155,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.hostnames.settings.tls.with_streaming_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -170,7 +170,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="", ) @@ -181,7 +181,7 @@ class TestAsyncTLS: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -191,7 +191,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -205,7 +205,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.update( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -222,7 +222,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.update( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -230,7 +230,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.update( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], @@ -239,7 +239,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -248,7 +248,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -261,7 +261,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) as response: @@ -277,14 +277,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.delete( - "app.example.com", + hostname="app.example.com", zone_id="", setting_id="ciphers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.delete( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) @@ -292,7 +292,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls = await async_client.hostnames.settings.tls.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TLSGetResponse], tls, path=["response"]) @@ -300,7 +300,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,7 +312,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.hostnames.settings.tls.with_streaming_response.get( - "ciphers", + setting_id="ciphers", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -327,6 +327,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.hostnames.settings.tls.with_raw_response.get( - "ciphers", + setting_id="ciphers", zone_id="", ) diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index b0f78ba131d..a6edc5fb868 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -120,7 +120,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -137,7 +137,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -159,7 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -180,7 +180,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -204,7 +204,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", name="example-hyperdrive", origin={ @@ -218,7 +218,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.update( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -271,7 +271,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigDeleteResponse, config, path=["response"]) @@ -279,7 +279,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -291,7 +291,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -306,13 +306,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.delete( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -320,7 +320,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -329,7 +329,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", caching={ "disabled": False, @@ -351,7 +351,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -364,7 +364,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -380,20 +380,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.edit( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -401,7 +401,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -413,7 +413,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.hyperdrive.configs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -428,13 +428,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): client.hyperdrive.configs.with_raw_response.get( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -541,7 +541,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -558,7 +558,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -580,7 +580,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -601,7 +601,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -625,7 +625,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", name="example-hyperdrive", origin={ @@ -639,7 +639,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.update( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="example-hyperdrive", origin={ @@ -692,7 +692,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConfigDeleteResponse, config, path=["response"]) @@ -700,7 +700,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -712,7 +712,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -727,13 +727,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.delete( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -741,7 +741,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -750,7 +750,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", caching={ "disabled": False, @@ -772,7 +772,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -785,7 +785,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -801,20 +801,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.edit( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Hyperdrive], config, path=["response"]) @@ -822,7 +822,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -834,7 +834,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.hyperdrive.configs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -849,12 +849,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + hyperdrive_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hyperdrive_id` but received ''"): await async_client.hyperdrive.configs.with_raw_response.get( - "", + hyperdrive_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/iam/test_permission_groups.py b/tests/api_resources/iam/test_permission_groups.py index 298235ce84e..b1da71007ab 100644 --- a/tests/api_resources/iam/test_permission_groups.py +++ b/tests/api_resources/iam/test_permission_groups.py @@ -71,7 +71,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: permission_group = client.iam.permission_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(PermissionGroupGetResponse, permission_group, path=["response"]) @@ -79,7 +79,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -91,7 +91,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.iam.permission_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -106,13 +106,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `permission_group_id` but received ''"): client.iam.permission_groups.with_raw_response.get( - "", + permission_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -173,7 +173,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: permission_group = await async_client.iam.permission_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(PermissionGroupGetResponse, permission_group, path=["response"]) @@ -181,7 +181,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -193,7 +193,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.iam.permission_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -208,12 +208,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.iam.permission_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + permission_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `permission_group_id` but received ''"): await async_client.iam.permission_groups.with_raw_response.get( - "", + permission_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) diff --git a/tests/api_resources/iam/test_resource_groups.py b/tests/api_resources/iam/test_resource_groups.py index a08c3160026..bd287629b9f 100644 --- a/tests/api_resources/iam/test_resource_groups.py +++ b/tests/api_resources/iam/test_resource_groups.py @@ -112,7 +112,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -128,7 +128,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -145,7 +145,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.iam.resource_groups.with_streaming_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -188,7 +188,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -202,7 +202,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): client.iam.resource_groups.with_raw_response.update( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -266,7 +266,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[ResourceGroupDeleteResponse], resource_group, path=["response"]) @@ -274,7 +274,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -286,7 +286,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.iam.resource_groups.with_streaming_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -301,20 +301,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): client.iam.resource_groups.with_raw_response.delete( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: resource_group = client.iam.resource_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(ResourceGroupGetResponse, resource_group, path=["response"]) @@ -322,7 +322,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -334,7 +334,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.iam.resource_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -349,13 +349,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): client.iam.resource_groups.with_raw_response.get( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -452,7 +452,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -468,7 +468,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -485,7 +485,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -505,7 +505,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.iam.resource_groups.with_streaming_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -528,7 +528,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.update( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -542,7 +542,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.update( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", scope={ "key": "com.cloudflare.api.account.eb78d65290b24279ba6f44721b3ea3c4", @@ -606,7 +606,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(Optional[ResourceGroupDeleteResponse], resource_group, path=["response"]) @@ -614,7 +614,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -626,7 +626,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.iam.resource_groups.with_streaming_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -641,20 +641,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.delete( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.delete( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: resource_group = await async_client.iam.resource_groups.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) assert_matches_type(ResourceGroupGetResponse, resource_group, path=["response"]) @@ -662,7 +662,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) @@ -674,7 +674,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.iam.resource_groups.with_streaming_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) as response: assert not response.is_closed @@ -689,12 +689,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.get( - "6d7f2f5f5b1d4a0e9081fdc98d432fd1", + resource_group_id="6d7f2f5f5b1d4a0e9081fdc98d432fd1", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `resource_group_id` but received ''"): await async_client.iam.resource_groups.with_raw_response.get( - "", + resource_group_id="", account_id="eb78d65290b24279ba6f44721b3ea3c4", ) diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index 5662df98dcc..1114273c5e3 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -126,7 +126,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: v1 = client.images.v1.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(V1DeleteResponse, v1, path=["response"]) @@ -134,7 +134,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -146,7 +146,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -161,20 +161,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.delete( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -182,7 +182,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: v1 = client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", metadata={}, require_signed_urls=True, @@ -192,7 +192,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -204,7 +204,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -219,20 +219,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.edit( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: v1 = client.images.v1.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,13 +267,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -385,7 +385,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(V1DeleteResponse, v1, path=["response"]) @@ -393,7 +393,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -405,7 +405,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.delete( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -420,20 +420,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.with_raw_response.delete( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.delete( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -441,7 +441,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", metadata={}, require_signed_urls=True, @@ -451,7 +451,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -463,7 +463,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.edit( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -478,20 +478,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.with_raw_response.edit( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.edit( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: v1 = await async_client.images.v1.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Image, v1, path=["response"]) @@ -499,7 +499,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -511,7 +511,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -526,12 +526,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/images/test_v2.py b/tests/api_resources/images/test_v2.py index 52527ae66ae..d668ca234a8 100644 --- a/tests/api_resources/images/test_v2.py +++ b/tests/api_resources/images/test_v2.py @@ -28,7 +28,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: v2 = client.images.v2.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - continuation_token="string", + continuation_token="continuation_token", per_page=10, sort_order="asc", ) @@ -80,7 +80,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: v2 = await async_client.images.v2.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - continuation_token="string", + continuation_token="continuation_token", per_page=10, sort_order="asc", ) diff --git a/tests/api_resources/images/v1/test_blobs.py b/tests/api_resources/images/v1/test_blobs.py index e9573fc5000..2d3a89dbc0b 100644 --- a/tests/api_resources/images/v1/test_blobs.py +++ b/tests/api_resources/images/v1/test_blobs.py @@ -26,11 +26,11 @@ class TestBlobs: @parametrize @pytest.mark.respx(base_url=base_url) def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = client.images.v1.blobs.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert blob.is_closed @@ -41,12 +41,12 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = client.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -58,11 +58,11 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.images.v1.blobs.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as blob: assert not blob.is_closed @@ -79,13 +79,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): client.images.v1.blobs.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -96,11 +96,11 @@ class TestAsyncBlobs: @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = await async_client.images.v1.blobs.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert blob.is_closed @@ -111,12 +111,12 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) blob = await async_client.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -128,11 +128,11 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/string/blob").mock( + respx_mock.get("/accounts/023e105f4ecef8ad9ca31a8372d0c353/images/v1/image_id/blob").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.images.v1.blobs.with_streaming_response.get( - "string", + image_id="image_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as blob: assert not blob.is_closed @@ -149,12 +149,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.blobs.with_raw_response.get( - "string", + image_id="image_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `image_id` but received ''"): await async_client.images.v1.blobs.with_raw_response.get( - "", + image_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/images/v1/test_keys.py b/tests/api_resources/images/v1/test_keys.py index 570044e7b4f..ef6122e1816 100644 --- a/tests/api_resources/images/v1/test_keys.py +++ b/tests/api_resources/images/v1/test_keys.py @@ -20,7 +20,7 @@ class TestKeys: @parametrize def test_method_update(self, client: Cloudflare) -> None: key = client.images.v1.keys.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyUpdateResponse, key, path=["response"]) @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): client.images.v1.keys.with_raw_response.update( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -106,7 +106,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.images.v1.keys.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -114,7 +114,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -126,7 +126,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.keys.with_streaming_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -141,13 +141,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): client.images.v1.keys.with_raw_response.delete( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ class TestAsyncKeys: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyUpdateResponse, key, path=["response"]) @@ -166,7 +166,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -178,7 +178,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.update( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.keys.with_raw_response.update( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): await async_client.images.v1.keys.with_raw_response.update( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -244,7 +244,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.images.v1.keys.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(KeyDeleteResponse, key, path=["response"]) @@ -252,7 +252,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -264,7 +264,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.keys.with_streaming_response.delete( - "someKey", + signing_key_name="someKey", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -279,12 +279,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.keys.with_raw_response.delete( - "someKey", + signing_key_name="someKey", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `signing_key_name` but received ''"): await async_client.images.v1.keys.with_raw_response.delete( - "", + signing_key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index d5cb41d40f0..0b88368b362 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -145,7 +145,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: variant = client.images.v1.variants.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantDeleteResponse, variant, path=["response"]) @@ -153,7 +153,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -165,7 +165,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -180,20 +180,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.delete( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: variant = client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -207,7 +207,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: variant = client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -222,7 +222,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -240,7 +240,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -261,7 +261,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="", options={ "fit": "scale-down", @@ -273,7 +273,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.edit( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -286,7 +286,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: variant = client.images.v1.variants.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantGetResponse, variant, path=["response"]) @@ -294,7 +294,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -306,7 +306,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.images.v1.variants.with_streaming_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -321,13 +321,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): client.images.v1.variants.with_raw_response.get( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -457,7 +457,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantDeleteResponse, variant, path=["response"]) @@ -465,7 +465,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -477,7 +477,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.delete( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -492,20 +492,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.variants.with_raw_response.delete( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.delete( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -519,7 +519,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -534,7 +534,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -552,7 +552,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.edit( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -573,7 +573,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.variants.with_raw_response.edit( - "hero", + variant_id="hero", account_id="", options={ "fit": "scale-down", @@ -585,7 +585,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.edit( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", options={ "fit": "scale-down", @@ -598,7 +598,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(VariantGetResponse, variant, path=["response"]) @@ -606,7 +606,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -618,7 +618,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.images.v1.variants.with_streaming_response.get( - "hero", + variant_id="hero", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -633,12 +633,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.images.v1.variants.with_raw_response.get( - "hero", + variant_id="hero", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `variant_id` but received ''"): await async_client.images.v1.variants.with_raw_response.get( - "", + variant_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/intel/asn/test_subnets.py b/tests/api_resources/intel/asn/test_subnets.py index b231532262f..116eb6f482b 100644 --- a/tests/api_resources/intel/asn/test_subnets.py +++ b/tests/api_resources/intel/asn/test_subnets.py @@ -20,7 +20,7 @@ class TestSubnets: @parametrize def test_method_get(self, client: Cloudflare) -> None: subnet = client.intel.asn.subnets.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubnetGetResponse, subnet, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.asn.subnets.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="", ) @@ -66,7 +66,7 @@ class TestAsyncSubnets: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: subnet = await async_client.intel.asn.subnets.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubnetGetResponse, subnet, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -86,7 +86,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.asn.subnets.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.asn.subnets.with_raw_response.get( - 0, + asn=0, account_id="", ) diff --git a/tests/api_resources/intel/attack_surface_report/test_issues.py b/tests/api_resources/intel/attack_surface_report/test_issues.py index c1e5f300928..db438e3e04a 100644 --- a/tests/api_resources/intel/attack_surface_report/test_issues.py +++ b/tests/api_resources/intel/attack_surface_report/test_issues.py @@ -141,7 +141,7 @@ def test_path_params_class(self, client: Cloudflare) -> None: @parametrize def test_method_dismiss(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @@ -149,7 +149,7 @@ def test_method_dismiss(self, client: Cloudflare) -> None: @parametrize def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: issue = client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", dismiss=True, ) @@ -158,7 +158,7 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_dismiss(self, client: Cloudflare) -> None: response = client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -170,7 +170,7 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_dismiss(self, client: Cloudflare) -> None: with client.intel.attack_surface_report.issues.with_streaming_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -185,13 +185,13 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None: def test_path_params_dismiss(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `issue_id` but received ''"): client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "", + issue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -428,7 +428,7 @@ async def test_path_params_class(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IssueDismissResponse], issue, path=["response"]) @@ -436,7 +436,7 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None: issue = await async_client.intel.attack_surface_report.issues.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", dismiss=True, ) @@ -445,7 +445,7 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar @parametrize async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -457,7 +457,7 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None @parametrize async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.attack_surface_report.issues.with_streaming_response.dismiss( - "string", + issue_id="issue_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -472,13 +472,13 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) - async def test_path_params_dismiss(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "string", + issue_id="issue_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `issue_id` but received ''"): await async_client.intel.attack_surface_report.issues.with_raw_response.dismiss( - "", + issue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/intel/indicator_feeds/test_snapshots.py b/tests/api_resources/intel/indicator_feeds/test_snapshots.py index 0db382b0f3f..5b7f91a523b 100644 --- a/tests/api_resources/intel/indicator_feeds/test_snapshots.py +++ b/tests/api_resources/intel/indicator_feeds/test_snapshots.py @@ -21,7 +21,7 @@ class TestSnapshots: @parametrize def test_method_update(self, client: Cloudflare) -> None: snapshot = client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: snapshot = client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", source="@/Users/me/test.stix2", ) @@ -40,7 +40,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.snapshots.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -69,7 +69,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="", ) @@ -81,7 +81,7 @@ class TestAsyncSnapshots: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: snapshot = await async_client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SnapshotUpdateResponse], snapshot, path=["response"]) @@ -90,7 +90,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: snapshot = await async_client.intel.indicator_feeds.snapshots.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", source="@/Users/me/test.stix2", ) @@ -100,7 +100,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -113,7 +113,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.snapshots.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -129,6 +129,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.indicator_feeds.snapshots.with_raw_response.update( - 12, + feed_id=12, account_id="", ) diff --git a/tests/api_resources/intel/test_asn.py b/tests/api_resources/intel/test_asn.py index 5ef9475861f..1b9016472fe 100644 --- a/tests/api_resources/intel/test_asn.py +++ b/tests/api_resources/intel/test_asn.py @@ -20,7 +20,7 @@ class TestASN: @parametrize def test_method_get(self, client: Cloudflare) -> None: asn = client.intel.asn.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ASN], asn, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.asn.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="", ) @@ -66,7 +66,7 @@ class TestAsyncASN: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: asn = await async_client.intel.asn.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ASN], asn, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -86,7 +86,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.asn.with_streaming_response.get( - 0, + asn=0, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.asn.with_raw_response.get( - 0, + asn=0, account_id="", ) diff --git a/tests/api_resources/intel/test_dns.py b/tests/api_resources/intel/test_dns.py index 4e95dc2891a..515012c788b 100644 --- a/tests/api_resources/intel/test_dns.py +++ b/tests/api_resources/intel/test_dns.py @@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: dns = client.intel.dns.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", + ipv4="ipv4", page=1, per_page=20, start_end_params={ @@ -86,7 +86,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: dns = await async_client.intel.dns.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", + ipv4="ipv4", page=1, per_page=20, start_end_params={ diff --git a/tests/api_resources/intel/test_domains.py b/tests/api_resources/intel/test_domains.py index 7241e5d4ad2..9a897bf7904 100644 --- a/tests/api_resources/intel/test_domains.py +++ b/tests/api_resources/intel/test_domains.py @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[Domain], domain, path=["response"]) @@ -78,7 +78,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.intel.domains.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[Domain], domain, path=["response"]) diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py index 45aee641fae..b1d65b7148f 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) @@ -81,7 +81,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is an example description", is_attributable=True, @@ -93,7 +93,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -105,7 +105,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -120,7 +120,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="", ) @@ -165,7 +165,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_data(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, indicator_feed, path=["response"]) @@ -173,7 +173,7 @@ def test_method_data(self, client: Cloudflare) -> None: @parametrize def test_raw_response_data(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -185,7 +185,7 @@ def test_raw_response_data(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_data(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -200,14 +200,14 @@ def test_streaming_response_data(self, client: Cloudflare) -> None: def test_path_params_data(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) @@ -215,7 +215,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -227,7 +227,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.intel.indicator_feeds.with_streaming_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -242,7 +242,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="", ) @@ -300,7 +300,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedUpdateResponse], indicator_feed, path=["response"]) @@ -308,7 +308,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is an example description", is_attributable=True, @@ -320,7 +320,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -332,7 +332,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.update( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -347,7 +347,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.indicator_feeds.with_raw_response.update( - 12, + feed_id=12, account_id="", ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_data(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, indicator_feed, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_data(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_data(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ async def test_raw_response_data(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_data(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.data( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -427,14 +427,14 @@ async def test_streaming_response_data(self, async_client: AsyncCloudflare) -> N async def test_path_params_data(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.indicator_feeds.with_raw_response.data( - 12, + feed_id=12, account_id="", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndicatorFeedGetResponse], indicator_feed, path=["response"]) @@ -442,7 +442,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.intel.indicator_feeds.with_streaming_response.get( - 12, + feed_id=12, account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,6 +469,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.intel.indicator_feeds.with_raw_response.get( - 12, + feed_id=12, account_id="", ) diff --git a/tests/api_resources/intel/test_ips.py b/tests/api_resources/intel/test_ips.py index 56721abdf3a..4f39c996906 100644 --- a/tests/api_resources/intel/test_ips.py +++ b/tests/api_resources/intel/test_ips.py @@ -28,8 +28,8 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip = client.intel.ips.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", - ipv6="string", + ipv4="ipv4", + ipv6="ipv6", ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) @@ -79,8 +79,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.intel.ips.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - ipv4="string", - ipv6="string", + ipv4="ipv4", + ipv6="ipv6", ) assert_matches_type(Optional[IPGetResponse], ip, path=["response"]) diff --git a/tests/api_resources/intel/test_miscategorizations.py b/tests/api_resources/intel/test_miscategorizations.py index 9f3f59fae1d..a72f326fff3 100644 --- a/tests/api_resources/intel/test_miscategorizations.py +++ b/tests/api_resources/intel/test_miscategorizations.py @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ip={}, security_adds=[117, 131], security_removes=[83], - url="string", + url="url", ) assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) @@ -90,7 +90,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ip={}, security_adds=[117, 131], security_removes=[83], - url="string", + url="url", ) assert_matches_type(Optional[MiscategorizationCreateResponse], miscategorization, path=["response"]) diff --git a/tests/api_resources/intel/test_whois.py b/tests/api_resources/intel/test_whois.py index c8f0f4035df..97c8efbf7a2 100644 --- a/tests/api_resources/intel/test_whois.py +++ b/tests/api_resources/intel/test_whois.py @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: whois = client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) @@ -78,7 +78,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: whois = await async_client.intel.whois.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - domain="string", + domain="domain", ) assert_matches_type(Optional[WhoisGetResponse], whois, path=["response"]) diff --git a/tests/api_resources/kv/namespaces/test_bulk.py b/tests/api_resources/kv/namespaces/test_bulk.py index 6a37a64f90e..42649742375 100644 --- a/tests/api_resources/kv/namespaces/test_bulk.py +++ b/tests/api_resources/kv/namespaces/test_bulk.py @@ -20,7 +20,7 @@ class TestBulk: @parametrize def test_method_update(self, client: Cloudflare) -> None: bulk = client.kv.namespaces.bulk.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.bulk.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: bulk = client.kv.namespaces.bulk.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkDeleteResponse], bulk, path=["response"]) @@ -81,7 +81,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.bulk.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.bulk.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncBulk: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.kv.namespaces.bulk.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.bulk.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -178,7 +178,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bulk = await async_client.kv.namespaces.bulk.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkDeleteResponse], bulk, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.bulk.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.bulk.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/kv/namespaces/test_keys.py b/tests/api_resources/kv/namespaces/test_keys.py index 26c09a1f9b5..074a872cc1d 100644 --- a/tests/api_resources/kv/namespaces/test_keys.py +++ b/tests/api_resources/kv/namespaces/test_keys.py @@ -21,7 +21,7 @@ class TestKeys: @parametrize def test_method_list(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncCursorLimitPagination[Key], key, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: key = client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw", limit=10, @@ -40,7 +40,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.kv.namespaces.keys.with_streaming_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,13 +67,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.keys.with_raw_response.list( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -84,7 +84,7 @@ class TestAsyncKeys: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncCursorLimitPagination[Key], key, path=["response"]) @@ -92,7 +92,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: key = await async_client.kv.namespaces.keys.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw", limit=10, @@ -103,7 +103,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,7 +115,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.keys.with_streaming_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -130,12 +130,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.keys.with_raw_response.list( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.keys.with_raw_response.list( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/kv/namespaces/test_metadata.py b/tests/api_resources/kv/namespaces/test_metadata.py index 7c8a4325a43..e6e56f6f06a 100644 --- a/tests/api_resources/kv/namespaces/test_metadata.py +++ b/tests/api_resources/kv/namespaces/test_metadata.py @@ -20,7 +20,7 @@ class TestMetadata: @parametrize def test_method_get(self, client: Cloudflare) -> None: metadata = client.kv.namespaces.metadata.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.kv.namespaces.metadata.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.metadata.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -84,7 +84,7 @@ class TestAsyncMetadata: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: metadata = await async_client.kv.namespaces.metadata.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -106,7 +106,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.metadata.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -122,21 +122,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.metadata.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.metadata.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) diff --git a/tests/api_resources/kv/namespaces/test_values.py b/tests/api_resources/kv/namespaces/test_values.py index 36b3d06967a..376ec1960ef 100644 --- a/tests/api_resources/kv/namespaces/test_values.py +++ b/tests/api_resources/kv/namespaces/test_values.py @@ -29,7 +29,7 @@ class TestValues: @parametrize def test_method_update(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -41,7 +41,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -57,7 +57,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -76,7 +76,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -85,7 +85,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -94,7 +94,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.values.with_raw_response.update( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -104,7 +104,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: value = client.kv.namespaces.values.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -113,7 +113,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -126,7 +126,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.values.with_streaming_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -142,21 +142,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.values.with_raw_response.delete( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -169,7 +169,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = client.kv.namespaces.values.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -205,7 +205,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.kv.namespaces.values.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as value: @@ -224,21 +224,21 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): client.kv.namespaces.values.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -251,7 +251,7 @@ class TestAsyncValues: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -263,7 +263,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -279,7 +279,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -298,7 +298,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -307,7 +307,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.update( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -316,7 +316,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.values.with_raw_response.update( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", metadata='{"someMetadataKey": "someMetadataValue"}', @@ -326,7 +326,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: value = await async_client.kv.namespaces.values.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -335,7 +335,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -348,7 +348,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.values.with_streaming_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as response: @@ -364,21 +364,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.delete( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.values.with_raw_response.delete( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -391,7 +391,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = await async_client.kv.namespaces.values.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -409,7 +409,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) value = await async_client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) @@ -427,7 +427,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/storage/kv/namespaces/0f2ac74b498b48028cb68387c421e279/values/My-Key" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.kv.namespaces.values.with_streaming_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) as value: @@ -446,21 +446,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="", namespace_id="0f2ac74b498b48028cb68387c421e279", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.values.with_raw_response.get( - "My-Key", + key_name="My-Key", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `key_name` but received ''"): await async_client.kv.namespaces.values.with_raw_response.get( - "", + key_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", namespace_id="0f2ac74b498b48028cb68387c421e279", ) diff --git a/tests/api_resources/kv/test_namespaces.py b/tests/api_resources/kv/test_namespaces.py index c8be55ff1e2..aa2e9589dfe 100644 --- a/tests/api_resources/kv/test_namespaces.py +++ b/tests/api_resources/kv/test_namespaces.py @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) as response: @@ -105,14 +105,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", title="My Own Namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -169,7 +169,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceDeleteResponse], namespace, path=["response"]) @@ -177,7 +177,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -204,20 +204,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: namespace = client.kv.namespaces.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Namespace], namespace, path=["response"]) @@ -225,7 +225,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -237,7 +237,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.kv.namespaces.with_streaming_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -252,13 +252,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): client.kv.namespaces.with_raw_response.get( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -311,7 +311,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -320,7 +320,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -333,7 +333,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) as response: @@ -349,14 +349,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.with_raw_response.update( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", title="My Own Namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.update( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", title="My Own Namespace", ) @@ -413,7 +413,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceDeleteResponse], namespace, path=["response"]) @@ -421,7 +421,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -433,7 +433,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -448,20 +448,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.with_raw_response.delete( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.delete( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.kv.namespaces.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Namespace], namespace, path=["response"]) @@ -469,7 +469,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -481,7 +481,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.kv.namespaces.with_streaming_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -496,12 +496,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.kv.namespaces.with_raw_response.get( - "0f2ac74b498b48028cb68387c421e279", + namespace_id="0f2ac74b498b48028cb68387c421e279", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `namespace_id` but received ''"): await async_client.kv.namespaces.with_raw_response.get( - "", + namespace_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/monitors/test_previews.py b/tests/api_resources/load_balancers/monitors/test_previews.py index 71a61ec7d40..88087f7cac9 100644 --- a/tests/api_resources/load_balancers/monitors/test_previews.py +++ b/tests/api_resources/load_balancers/monitors/test_previews.py @@ -20,7 +20,7 @@ class TestPreviews: @parametrize def test_method_create(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: preview = client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -69,7 +69,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.monitors.previews.with_streaming_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.previews.with_raw_response.create( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -104,7 +104,7 @@ class TestAsyncPreviews: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -113,7 +113,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.monitors.previews.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -140,7 +140,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -153,7 +153,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.previews.with_streaming_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -169,14 +169,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.previews.with_raw_response.create( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.previews.with_raw_response.create( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) diff --git a/tests/api_resources/load_balancers/monitors/test_references.py b/tests/api_resources/load_balancers/monitors/test_references.py index a31063f687e..58c8dcd21b2 100644 --- a/tests/api_resources/load_balancers/monitors/test_references.py +++ b/tests/api_resources/load_balancers/monitors/test_references.py @@ -20,7 +20,7 @@ class TestReferences: @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.load_balancers.monitors.references.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.monitors.references.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.references.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncReferences: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.load_balancers.monitors.references.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.references.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.references.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.references.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/pools/test_health.py b/tests/api_resources/load_balancers/pools/test_health.py index 6c9b62dcdea..eba8b0346db 100644 --- a/tests/api_resources/load_balancers/pools/test_health.py +++ b/tests/api_resources/load_balancers/pools/test_health.py @@ -20,7 +20,7 @@ class TestHealth: @parametrize def test_method_create(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -69,7 +69,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.health.with_raw_response.create( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -100,7 +100,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: health = client.load_balancers.pools.health.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthGetResponse, health, path=["response"]) @@ -108,7 +108,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -120,7 +120,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.health.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -135,13 +135,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.health.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -152,7 +152,7 @@ class TestAsyncHealth: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -161,7 +161,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -188,7 +188,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -201,7 +201,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.health.with_streaming_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -217,14 +217,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.create( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.create( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -232,7 +232,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: health = await async_client.load_balancers.pools.health.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthGetResponse, health, path=["response"]) @@ -240,7 +240,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.health.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,12 +267,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.health.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/pools/test_references.py b/tests/api_resources/load_balancers/pools/test_references.py index 409be7228ac..cde06313f61 100644 --- a/tests/api_resources/load_balancers/pools/test_references.py +++ b/tests/api_resources/load_balancers/pools/test_references.py @@ -20,7 +20,7 @@ class TestReferences: @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.load_balancers.pools.references.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.references.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.references.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncReferences: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.load_balancers.pools.references.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.references.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.references.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.references.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index aec60b132cd..051a99da886 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -92,7 +92,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -101,7 +101,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -128,7 +128,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -141,7 +141,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -157,14 +157,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.update( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -210,7 +210,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) @@ -218,7 +218,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -230,7 +230,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -245,20 +245,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.delete( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -267,7 +267,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -294,7 +294,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -307,7 +307,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -323,14 +323,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.edit( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -338,7 +338,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -346,7 +346,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -358,7 +358,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.monitors.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -373,13 +373,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): client.load_balancers.monitors.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -458,7 +458,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -467,7 +467,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -494,7 +494,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -507,7 +507,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -523,14 +523,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.update( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.update( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -576,7 +576,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(MonitorDeleteResponse, monitor, path=["response"]) @@ -584,7 +584,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -596,7 +596,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -611,20 +611,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.delete( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.delete( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -633,7 +633,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", allow_insecure=True, @@ -660,7 +660,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -673,7 +673,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) as response: @@ -689,14 +689,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.edit( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", expected_codes="2xx", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.edit( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", expected_codes="2xx", ) @@ -704,7 +704,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Monitor, monitor, path=["response"]) @@ -712,7 +712,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -724,7 +724,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.monitors.with_streaming_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -739,12 +739,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.get( - "f1aba936b94213e5b8dca0c0dbf1f9cc", + monitor_id="f1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `monitor_id` but received ''"): await async_client.load_balancers.monitors.with_raw_response.get( - "", + monitor_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py index e128a3f2287..7d82191846e 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -128,7 +128,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -138,7 +138,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[ @@ -198,7 +198,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -212,7 +212,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -229,7 +229,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", name="primary-dc-1", origins=[{}, {}, {}], @@ -237,7 +237,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.update( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -292,7 +292,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PoolDeleteResponse, pool, path=["response"]) @@ -300,7 +300,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,7 +312,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -327,20 +327,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.delete( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -348,7 +348,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", check_regions=["WEU", "ENAM"], description="Primary data center - Provider XYZ", @@ -408,7 +408,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -420,7 +420,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -435,20 +435,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.edit( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -456,7 +456,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -468,7 +468,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.pools.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -483,13 +483,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): client.load_balancers.pools.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -604,7 +604,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -614,7 +614,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[ @@ -674,7 +674,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -688,7 +688,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -705,7 +705,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.update( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", name="primary-dc-1", origins=[{}, {}, {}], @@ -713,7 +713,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.update( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="primary-dc-1", origins=[{}, {}, {}], @@ -768,7 +768,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PoolDeleteResponse, pool, path=["response"]) @@ -776,7 +776,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -788,7 +788,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -803,20 +803,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.delete( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.delete( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -824,7 +824,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", check_regions=["WEU", "ENAM"], description="Primary data center - Provider XYZ", @@ -884,7 +884,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -896,7 +896,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -911,20 +911,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.edit( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.edit( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Pool, pool, path=["response"]) @@ -932,7 +932,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -944,7 +944,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.pools.with_streaming_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -959,12 +959,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.get( - "17b5962d775c646f3f9725cbc7a53df4", + pool_id="17b5962d775c646f3f9725cbc7a53df4", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_id` but received ''"): await async_client.load_balancers.pools.with_raw_response.get( - "", + pool_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py index 62da37e0c52..281f21e0600 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -20,7 +20,7 @@ class TestPreviews: @parametrize def test_method_get(self, client: Cloudflare) -> None: preview = client.load_balancers.previews.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewGetResponse, preview, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.previews.with_streaming_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `preview_id` but received ''"): client.load_balancers.previews.with_raw_response.get( - "", + preview_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncPreviews: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.load_balancers.previews.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PreviewGetResponse, preview, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.previews.with_streaming_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.previews.with_raw_response.get( - "p1aba936b94213e5b8dca0c0dbf1f9cc", + preview_id="p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `preview_id` but received ''"): await async_client.load_balancers.previews.with_raw_response.get( - "", + preview_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/load_balancers/test_regions.py b/tests/api_resources/load_balancers/test_regions.py index 34d882330a0..6e689dc253b 100644 --- a/tests/api_resources/load_balancers/test_regions.py +++ b/tests/api_resources/load_balancers/test_regions.py @@ -68,7 +68,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: region = client.load_balancers.regions.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionGetResponse, region, path=["response"]) @@ -76,7 +76,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.regions.with_streaming_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -103,7 +103,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="", ) @@ -162,7 +162,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: region = await async_client.load_balancers.regions.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RegionGetResponse, region, path=["response"]) @@ -170,7 +170,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.regions.with_streaming_response.get( - "WNAM", + region_id="WNAM", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -197,6 +197,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.load_balancers.regions.with_raw_response.get( - "WNAM", + region_id="WNAM", account_id="", ) diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py index fb994642e7b..b62d8b5a19f 100644 --- a/tests/api_resources/logpush/datasets/test_fields.py +++ b/tests/api_resources/logpush/datasets/test_fields.py @@ -20,8 +20,8 @@ class TestFields: @parametrize def test_method_get(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -29,8 +29,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -38,8 +38,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -51,8 +51,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.fields.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,20 +67,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) @@ -91,8 +91,8 @@ class TestAsyncFields: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -100,8 +100,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(object, field, path=["response"]) @@ -109,8 +109,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -122,8 +122,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.datasets.fields.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,18 +138,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.datasets.fields.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py index 7176ea97c6f..7d87be256af 100644 --- a/tests/api_resources/logpush/datasets/test_jobs.py +++ b/tests/api_resources/logpush/datasets/test_jobs.py @@ -21,8 +21,8 @@ class TestJobs: @parametrize def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -30,8 +30,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -39,8 +39,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -52,8 +52,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.jobs.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,20 +68,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) @@ -92,8 +92,8 @@ class TestAsyncJobs: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -101,8 +101,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -110,8 +110,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) assert response.is_closed is True @@ -123,8 +123,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.datasets.jobs.with_streaming_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,18 +139,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", + dataset_id="http_requests", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.datasets.jobs.with_raw_response.get( - "http_requests", - account_id="string", + dataset_id="http_requests", + account_id="account_id", ) diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index 05950cab7b9..3a730eb3e3c 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -23,7 +23,7 @@ class TestJobs: def test_method_create(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", dataset="http_requests", enabled=False, frequency="high", @@ -44,15 +44,15 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="example.com", output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -65,7 +65,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -78,7 +78,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -100,15 +100,15 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -116,8 +116,8 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", @@ -128,15 +128,15 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: max_upload_records=1000, output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -148,8 +148,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -161,8 +161,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,21 +177,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.update( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -199,7 +199,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -207,7 +207,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -219,7 +219,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -239,15 +239,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -255,8 +255,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -264,8 +264,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -277,8 +277,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -293,22 +293,22 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.delete( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -316,8 +316,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -325,8 +325,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -338,8 +338,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -354,14 +354,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.logpush.jobs.with_raw_response.get( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @@ -373,7 +373,7 @@ class TestAsyncJobs: async def test_method_create(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -382,7 +382,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", dataset="http_requests", enabled=False, frequency="high", @@ -394,15 +394,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="example.com", output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -415,7 +415,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -428,7 +428,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -450,15 +450,15 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -466,8 +466,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", @@ -478,15 +478,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare max_upload_records=1000, output_options={ "cve_2021_4428": True, - "batch_prefix": "string", - "batch_suffix": "string", - "field_delimiter": "string", + "batch_prefix": "batch_prefix", + "batch_suffix": "batch_suffix", + "field_delimiter": "field_delimiter", "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID"], "output_type": "ndjson", - "record_delimiter": "string", - "record_prefix": "string", - "record_suffix": "string", - "record_template": "string", + "record_delimiter": "record_delimiter", + "record_prefix": "record_prefix", + "record_suffix": "record_suffix", + "record_template": "record_template", "sample_rate": 0, "timestamp_format": "unixnano", }, @@ -498,8 +498,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -511,8 +511,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -527,21 +527,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.update( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.update( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -549,7 +549,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -557,7 +557,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -569,7 +569,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -589,15 +589,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -605,8 +605,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(object, job, path=["response"]) @@ -614,8 +614,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -627,8 +627,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -643,22 +643,22 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.delete( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.delete( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -666,8 +666,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -675,8 +675,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) assert response.is_closed is True @@ -688,8 +688,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -704,12 +704,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.logpush.jobs.with_raw_response.get( - 1, + job_id=1, account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.jobs.with_raw_response.get( - 1, - account_id="string", + job_id=1, + account_id="account_id", ) diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py index ce1f9a83fb3..c2d9297623c 100644 --- a/tests/api_resources/logpush/test_ownership.py +++ b/tests/api_resources/logpush/test_ownership.py @@ -25,7 +25,7 @@ class TestOwnership: def test_method_create(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -43,7 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,7 +78,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -87,7 +87,7 @@ def test_method_validate(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -97,7 +97,7 @@ def test_method_validate_with_all_params(self, client: Cloudflare) -> None: ownership = client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -107,7 +107,7 @@ def test_raw_response_validate(self, client: Cloudflare) -> None: response = client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None: with client.logpush.ownership.with_streaming_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,7 +145,7 @@ def test_path_params_validate(self, client: Cloudflare) -> None: client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) @@ -157,7 +157,7 @@ class TestAsyncOwnership: async def test_method_create(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -166,7 +166,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -175,7 +175,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -188,7 +188,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -210,7 +210,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -219,7 +219,7 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -229,7 +229,7 @@ async def test_method_validate_with_all_params(self, async_client: AsyncCloudfla ownership = await async_client.logpush.ownership.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -239,7 +239,7 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non response = await async_client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -253,7 +253,7 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare) async with async_client.logpush.ownership.with_streaming_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -277,5 +277,5 @@ async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None await async_client.logpush.ownership.with_raw_response.validate( destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py index 7b80c557e5d..fd2a12df619 100644 --- a/tests/api_resources/logpush/test_validate.py +++ b/tests/api_resources/logpush/test_validate.py @@ -25,7 +25,7 @@ class TestValidate: def test_method_destination(self, client: Cloudflare) -> None: validate = client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -34,7 +34,7 @@ def test_method_destination(self, client: Cloudflare) -> None: def test_method_destination_with_all_params(self, client: Cloudflare) -> None: validate = client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -43,7 +43,7 @@ def test_method_destination_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_destination(self, client: Cloudflare) -> None: response = client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -56,7 +56,7 @@ def test_raw_response_destination(self, client: Cloudflare) -> None: def test_streaming_response_destination(self, client: Cloudflare) -> None: with client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,7 +78,7 @@ def test_path_params_destination(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -86,7 +86,7 @@ def test_path_params_destination(self, client: Cloudflare) -> None: def test_method_origin(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -95,7 +95,7 @@ def test_method_origin(self, client: Cloudflare) -> None: def test_method_origin_with_all_params(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -104,7 +104,7 @@ def test_method_origin_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_origin(self, client: Cloudflare) -> None: response = client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -117,7 +117,7 @@ def test_raw_response_origin(self, client: Cloudflare) -> None: def test_streaming_response_origin(self, client: Cloudflare) -> None: with client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +139,7 @@ def test_path_params_origin(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) @@ -151,7 +151,7 @@ class TestAsyncValidate: async def test_method_destination(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -160,7 +160,7 @@ async def test_method_destination(self, async_client: AsyncCloudflare) -> None: async def test_method_destination_with_all_params(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -169,7 +169,7 @@ async def test_method_destination_with_all_params(self, async_client: AsyncCloud async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -182,7 +182,7 @@ async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> async def test_streaming_response_destination(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,7 +204,7 @@ async def test_path_params_destination(self, async_client: AsyncCloudflare) -> N with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -212,7 +212,7 @@ async def test_path_params_destination(self, async_client: AsyncCloudflare) -> N async def test_method_origin(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -221,7 +221,7 @@ async def test_method_origin(self, async_client: AsyncCloudflare) -> None: async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare) -> None: validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -230,7 +230,7 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -243,7 +243,7 @@ async def test_raw_response_origin(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -265,5 +265,5 @@ async def test_path_params_origin(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/logs/control/test_retention.py b/tests/api_resources/logs/control/test_retention.py index b3ae8454210..c88567517cb 100644 --- a/tests/api_resources/logs/control/test_retention.py +++ b/tests/api_resources/logs/control/test_retention.py @@ -20,7 +20,7 @@ class TestRetention: @parametrize def test_method_create(self, client: Cloudflare) -> None: retention = client.logs.control.retention.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) assert_matches_type(RetentionCreateResponse, retention, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.logs.control.retention.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) @@ -40,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.logs.control.retention.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.logs.control.retention.with_raw_response.create( - "", + zone_identifier="", flag=True, ) @@ -104,7 +104,7 @@ class TestAsyncRetention: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: retention = await async_client.logs.control.retention.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) assert_matches_type(RetentionCreateResponse, retention, path=["response"]) @@ -112,7 +112,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.control.retention.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) @@ -124,7 +124,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.control.retention.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", flag=True, ) as response: assert not response.is_closed @@ -139,7 +139,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.logs.control.retention.with_raw_response.create( - "", + zone_identifier="", flag=True, ) diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py index 5268b84e977..6a18a0ba0dd 100644 --- a/tests/api_resources/logs/test_rayid.py +++ b/tests/api_resources/logs/test_rayid.py @@ -20,7 +20,7 @@ class TestRayID: @parametrize def test_method_get(self, client: Cloudflare) -> None: rayid = client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: rayid = client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", fields="ClientIP,RayID,EdgeStartTimestamp", timestamps="unixnano", @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -50,7 +50,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.rayid.with_streaming_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -65,13 +65,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ray_identifier` but received ''"): client.logs.rayid.with_raw_response.get( - "", + ray_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -82,7 +82,7 @@ class TestAsyncRayID: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rayid = await async_client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RayIDGetResponse, rayid, path=["response"]) @@ -90,7 +90,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: rayid = await async_client.logs.rayid.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", fields="ClientIP,RayID,EdgeStartTimestamp", timestamps="unixnano", @@ -100,7 +100,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.rayid.with_streaming_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,12 +127,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.logs.rayid.with_raw_response.get( - "41ddf1740f67442d", + ray_identifier="41ddf1740f67442d", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ray_identifier` but received ''"): await async_client.logs.rayid.with_raw_response.get( - "", + ray_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/logs/test_received.py b/tests/api_resources/logs/test_received.py index 86effb42fe4..5f3746d0335 100644 --- a/tests/api_resources/logs/test_received.py +++ b/tests/api_resources/logs/test_received.py @@ -20,7 +20,7 @@ class TestReceived: @parametrize def test_method_get(self, client: Cloudflare) -> None: received = client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: received = client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", count=1, fields="ClientIP,RayID,EdgeStartTimestamp", @@ -41,7 +41,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logs.received.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) @@ -53,7 +53,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logs.received.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) as response: assert not response.is_closed @@ -68,7 +68,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.logs.received.with_raw_response.get( - "", + zone_identifier="", end="2018-05-20T10:01:00Z", ) @@ -79,7 +79,7 @@ class TestAsyncReceived: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: received = await async_client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) assert_matches_type(ReceivedGetResponse, received, path=["response"]) @@ -87,7 +87,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: received = await async_client.logs.received.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", count=1, fields="ClientIP,RayID,EdgeStartTimestamp", @@ -100,7 +100,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.logs.received.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) @@ -112,7 +112,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.logs.received.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", end="2018-05-20T10:01:00Z", ) as response: assert not response.is_closed @@ -127,6 +127,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.logs.received.with_raw_response.get( - "", + zone_identifier="", end="2018-05-20T10:01:00Z", ) diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py index 6f0e476a67e..46761c021c6 100644 --- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py +++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py @@ -20,7 +20,7 @@ class TestAdvertisements: @parametrize def test_method_edit(self, client: Cloudflare) -> None: advertisement = client.magic_network_monitoring.rules.advertisements.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -29,7 +29,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.advertisements.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -77,7 +77,7 @@ class TestAsyncAdvertisements: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: advertisement = await async_client.magic_network_monitoring.rules.advertisements.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -86,7 +86,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -99,7 +99,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.advertisements.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -115,14 +115,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.advertisements.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index b813da89aca..d2b2bce970e 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -145,7 +145,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -153,7 +153,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -165,7 +165,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -180,20 +180,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.delete( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -202,7 +202,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -215,7 +215,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -231,14 +231,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -246,7 +246,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -254,7 +254,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -266,7 +266,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_network_monitoring.rules.with_streaming_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -281,13 +281,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.magic_network_monitoring.rules.with_raw_response.get( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -420,7 +420,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -428,7 +428,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -440,7 +440,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -455,20 +455,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.delete( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.delete( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -477,7 +477,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -490,7 +490,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) as response: @@ -506,14 +506,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.edit( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.edit( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", body={}, ) @@ -521,7 +521,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @@ -529,7 +529,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) @@ -541,7 +541,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_network_monitoring.rules.with_streaming_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) as response: assert not response.is_closed @@ -556,12 +556,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.get( - "2890e6fa406311ed9b5a23f70f6fb8cf", + rule_id="2890e6fa406311ed9b5a23f70f6fb8cf", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.magic_network_monitoring.rules.with_raw_response.get( - "", + rule_id="", account_id="6f91088a406011ed95aed352566e8d4c", ) diff --git a/tests/api_resources/magic_transit/sites/test_acls.py b/tests/api_resources/magic_transit/sites/test_acls.py index 9cac4c6dee6..bf74fe77628 100644 --- a/tests/api_resources/magic_transit/sites/test_acls.py +++ b/tests/api_resources/magic_transit/sites/test_acls.py @@ -23,10 +23,10 @@ class TestACLs: @parametrize def test_method_create(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) assert_matches_type(ACL, acl, path=["response"]) @@ -34,17 +34,17 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, lan_2={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -58,10 +58,10 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @@ -73,10 +73,10 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) as response: assert not response.is_closed @@ -91,26 +91,26 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -119,20 +119,20 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", description="Allows local traffic between PIN pads and cash register.", forward_locally=True, lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, lan_2={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -144,7 +144,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -157,7 +157,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -173,21 +173,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.update( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -195,7 +195,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[ACL], acl, path=["response"]) @@ -203,7 +203,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -215,7 +215,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -230,20 +230,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -265,7 +265,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -281,21 +281,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.delete( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -303,7 +303,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,20 +312,20 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", description="Allows local traffic between PIN pads and cash register.", forward_locally=True, lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, lan_2={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -337,7 +337,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -350,7 +350,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -366,21 +366,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.edit( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -388,7 +388,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: acl = client.magic_transit.sites.acls.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -397,7 +397,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -410,7 +410,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.acls.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -426,21 +426,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.magic_transit.sites.acls.with_raw_response.get( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -452,10 +452,10 @@ class TestAsyncACLs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) assert_matches_type(ACL, acl, path=["response"]) @@ -463,17 +463,17 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, lan_2={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -487,10 +487,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @@ -502,10 +502,10 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) as response: assert not response.is_closed @@ -520,26 +520,26 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lan_1={"lan_id": "string"}, - lan_2={"lan_id": "string"}, + lan_1={"lan_id": "lan_id"}, + lan_2={"lan_id": "lan_id"}, name="PIN Pad - Cash Register", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -548,20 +548,20 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", description="Allows local traffic between PIN pads and cash register.", forward_locally=True, lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, lan_2={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -573,7 +573,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -586,7 +586,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -602,21 +602,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.update( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -624,7 +624,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[ACL], acl, path=["response"]) @@ -632,7 +632,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -644,7 +644,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -659,20 +659,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -681,7 +681,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -694,7 +694,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -710,21 +710,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.delete( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -732,7 +732,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -741,20 +741,20 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", description="Allows local traffic between PIN pads and cash register.", forward_locally=True, lan_1={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, lan_2={ - "lan_id": "string", - "lan_name": "string", + "lan_id": "lan_id", + "lan_name": "lan_name", "ports": [1, 1, 1], "subnets": ["192.0.2.1", "192.0.2.1", "192.0.2.1"], }, @@ -766,7 +766,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -779,7 +779,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -795,21 +795,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.edit( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -817,7 +817,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: acl = await async_client.magic_transit.sites.acls.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -826,7 +826,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -839,7 +839,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.acls.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -855,21 +855,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + acl_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.magic_transit.sites.acls.with_raw_response.get( - "", + acl_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py index 73aee303592..9d0be9dce40 100644 --- a/tests/api_resources/magic_transit/sites/test_lans.py +++ b/tests/api_resources/magic_transit/sites/test_lans.py @@ -24,7 +24,7 @@ class TestLANs: @parametrize def test_method_create(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -34,12 +34,12 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, ha_link=True, - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, routed_subnets=[ { @@ -79,7 +79,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -93,7 +93,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -110,7 +110,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -118,7 +118,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -127,7 +127,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,10 +136,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -181,7 +181,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -194,7 +194,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -210,21 +210,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.update( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -232,7 +232,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[LAN], lan, path=["response"]) @@ -240,7 +240,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,20 +267,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -289,7 +289,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -302,7 +302,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -318,21 +318,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.delete( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -340,7 +340,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,10 +349,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -394,7 +394,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -407,7 +407,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -423,21 +423,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.edit( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -445,7 +445,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: lan = client.magic_transit.sites.lans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -467,7 +467,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.lans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -483,21 +483,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): client.magic_transit.sites.lans.with_raw_response.get( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -509,7 +509,7 @@ class TestAsyncLANs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -519,12 +519,12 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, ha_link=True, - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, routed_subnets=[ { @@ -564,7 +564,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -578,7 +578,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -595,7 +595,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -603,7 +603,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -612,7 +612,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -621,10 +621,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -666,7 +666,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -679,7 +679,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -695,21 +695,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.update( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -717,7 +717,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[LAN], lan, path=["response"]) @@ -725,7 +725,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -737,7 +737,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -752,20 +752,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -774,7 +774,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -787,7 +787,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -803,21 +803,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.delete( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -825,7 +825,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -834,10 +834,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", nat={"static_prefix": "192.0.2.0/24"}, physport=1, routed_subnets=[ @@ -879,7 +879,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -892,7 +892,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -908,21 +908,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.edit( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -930,7 +930,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: lan = await async_client.magic_transit.sites.lans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -939,7 +939,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -952,7 +952,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.lans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -968,21 +968,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + lan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `lan_id` but received ''"): await async_client.magic_transit.sites.lans.with_raw_response.get( - "", + lan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py index d8fa728ed91..c3ba81f3615 100644 --- a/tests/api_resources/magic_transit/sites/test_wans.py +++ b/tests/api_resources/magic_transit/sites/test_wans.py @@ -24,7 +24,7 @@ class TestWANs: @parametrize def test_method_create(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -34,11 +34,11 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, - name="string", + name="name", priority=0, static_addressing={ "address": "192.0.2.0/24", @@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -65,7 +65,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -82,7 +82,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -99,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -108,10 +108,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -126,7 +126,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -155,21 +155,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.update( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,7 +177,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[WAN], wan, path=["response"]) @@ -185,7 +185,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -197,7 +197,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -212,20 +212,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -234,7 +234,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -247,7 +247,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -263,21 +263,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.delete( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -294,10 +294,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -312,7 +312,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -325,7 +325,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -341,21 +341,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.edit( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -363,7 +363,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: wan = client.magic_transit.sites.wans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -372,7 +372,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -385,7 +385,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.wans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -401,21 +401,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): client.magic_transit.sites.wans.with_raw_response.get( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -427,7 +427,7 @@ class TestAsyncWANs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -437,11 +437,11 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, - name="string", + name="name", priority=0, static_addressing={ "address": "192.0.2.0/24", @@ -454,7 +454,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -468,7 +468,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -485,7 +485,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", physport=1, vlan_tag=0, @@ -493,7 +493,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.create( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", physport=1, vlan_tag=0, @@ -502,7 +502,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -511,10 +511,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -529,7 +529,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -542,7 +542,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -558,21 +558,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.update( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -580,7 +580,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[WAN], wan, path=["response"]) @@ -588,7 +588,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -600,7 +600,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -615,20 +615,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.list( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -637,7 +637,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -650,7 +650,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -666,21 +666,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.delete( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -688,7 +688,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -697,10 +697,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", - name="string", + name="name", physport=1, priority=0, static_addressing={ @@ -715,7 +715,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -728,7 +728,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -744,21 +744,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.edit( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -766,7 +766,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: wan = await async_client.magic_transit.sites.wans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -775,7 +775,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -788,7 +788,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.wans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -804,21 +804,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + wan_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `wan_id` but received ''"): await async_client.magic_transit.sites.wans.with_raw_response.get( - "", + wan_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", site_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_apps.py b/tests/api_resources/magic_transit/test_apps.py index 1cd6c73830d..7a2bea638d1 100644 --- a/tests/api_resources/magic_transit/test_apps.py +++ b/tests/api_resources/magic_transit/test_apps.py @@ -137,7 +137,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -149,7 +149,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -165,7 +165,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -184,14 +184,14 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -202,7 +202,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -214,7 +214,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -230,7 +230,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -249,14 +249,14 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -267,7 +267,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -279,7 +279,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -295,7 +295,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -314,14 +314,14 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -332,7 +332,7 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: app = client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -344,7 +344,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -360,7 +360,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -379,14 +379,14 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -444,7 +444,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: app = client.magic_transit.apps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -452,7 +452,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -464,7 +464,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.apps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -479,13 +479,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): client.magic_transit.apps.with_raw_response.delete( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -607,7 +607,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -619,7 +619,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -635,7 +635,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -654,14 +654,14 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -672,7 +672,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -684,7 +684,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -700,7 +700,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -719,14 +719,14 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -737,7 +737,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -749,7 +749,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -765,7 +765,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -784,14 +784,14 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -802,7 +802,7 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -814,7 +814,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -830,7 +830,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -849,14 +849,14 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.update( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -914,7 +914,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: app = await async_client.magic_transit.apps.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -922,7 +922,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -934,7 +934,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.apps.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -949,12 +949,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + account_app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_app_id` but received ''"): await async_client.magic_transit.apps.with_raw_response.delete( - "", + account_app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_cf_interconnects.py b/tests/api_resources/magic_transit/test_cf_interconnects.py index efb8610882b..203c0a018a1 100644 --- a/tests/api_resources/magic_transit/test_cf_interconnects.py +++ b/tests/api_resources/magic_transit/test_cf_interconnects.py @@ -24,7 +24,7 @@ class TestCfInterconnects: @parametrize def test_method_update(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) @@ -32,7 +32,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Tunnel for Interconnect to ORD", gre={"cloudflare_endpoint": "203.0.113.1"}, @@ -50,7 +50,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -62,7 +62,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -77,13 +77,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): client.magic_transit.cf_interconnects.with_raw_response.update( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -128,7 +128,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: cf_interconnect = client.magic_transit.cf_interconnects.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) @@ -136,7 +136,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -148,7 +148,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.cf_interconnects.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -163,13 +163,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): client.magic_transit.cf_interconnects.with_raw_response.get( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -180,7 +180,7 @@ class TestAsyncCfInterconnects: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectUpdateResponse, cf_interconnect, path=["response"]) @@ -188,7 +188,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="Tunnel for Interconnect to ORD", gre={"cloudflare_endpoint": "203.0.113.1"}, @@ -206,7 +206,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -218,7 +218,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.cf_interconnects.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -233,13 +233,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.cf_interconnects.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): await async_client.magic_transit.cf_interconnects.with_raw_response.update( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cf_interconnect = await async_client.magic_transit.cf_interconnects.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CfInterconnectGetResponse, cf_interconnect, path=["response"]) @@ -292,7 +292,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -304,7 +304,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.cf_interconnects.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -319,12 +319,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.cf_interconnects.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cf_interconnect_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cf_interconnect_id` but received ''"): await async_client.magic_transit.cf_interconnects.with_raw_response.get( - "", + cf_interconnect_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_connectors.py b/tests/api_resources/magic_transit/test_connectors.py index b2e77874a82..75506734f5e 100644 --- a/tests/api_resources/magic_transit/test_connectors.py +++ b/tests/api_resources/magic_transit/test_connectors.py @@ -26,7 +26,7 @@ class TestConnectors: @parametrize def test_method_update(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @@ -34,20 +34,20 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -59,7 +59,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -74,13 +74,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.magic_transit.connectors.with_raw_response.update( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @@ -133,20 +133,20 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -173,20 +173,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.magic_transit.connectors.with_raw_response.edit( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: connector = client.magic_transit.connectors.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorGetResponse, connector, path=["response"]) @@ -194,7 +194,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -206,7 +206,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.connectors.with_streaming_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -221,13 +221,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.magic_transit.connectors.with_raw_response.get( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ class TestAsyncConnectors: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @@ -246,20 +246,20 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorUpdateResponse, connector, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -271,7 +271,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.connectors.with_streaming_response.update( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -286,13 +286,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.update( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.update( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -337,7 +337,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @@ -345,20 +345,20 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", activated=True, interrupt_window_duration_hours=0, interrupt_window_hour_of_day=0, - notes="string", - timezone="string", + notes="notes", + timezone="timezone", ) assert_matches_type(ConnectorEditResponse, connector, path=["response"]) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -370,7 +370,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.connectors.with_streaming_response.edit( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -385,20 +385,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.edit( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.edit( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connector = await async_client.magic_transit.connectors.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ConnectorGetResponse, connector, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -418,7 +418,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.connectors.with_streaming_response.get( - "string", + connector_id="connector_id", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -433,12 +433,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.get( - "string", + connector_id="connector_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.magic_transit.connectors.with_raw_response.get( - "", + connector_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_gre_tunnels.py b/tests/api_resources/magic_transit/test_gre_tunnels.py index 512d2d01880..a444b45f529 100644 --- a/tests/api_resources/magic_transit/test_gre_tunnels.py +++ b/tests/api_resources/magic_transit/test_gre_tunnels.py @@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -84,7 +84,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -106,7 +106,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -122,7 +122,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -141,7 +141,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -151,7 +151,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.update( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -200,7 +200,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) @@ -208,7 +208,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -220,7 +220,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -235,20 +235,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.delete( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: gre_tunnel = client.magic_transit.gre_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) @@ -256,7 +256,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -268,7 +268,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.gre_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -283,13 +283,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): client.magic_transit.gre_tunnels.with_raw_response.get( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -346,7 +346,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -358,7 +358,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -380,7 +380,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -396,7 +396,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -415,7 +415,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -425,7 +425,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.update( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_gre_endpoint="203.0.113.1", customer_gre_endpoint="203.0.113.1", @@ -474,7 +474,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelDeleteResponse, gre_tunnel, path=["response"]) @@ -482,7 +482,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -494,7 +494,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -509,20 +509,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.delete( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: gre_tunnel = await async_client.magic_transit.gre_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(GRETunnelGetResponse, gre_tunnel, path=["response"]) @@ -530,7 +530,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -542,7 +542,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.gre_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -557,12 +557,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + gre_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `gre_tunnel_id` but received ''"): await async_client.magic_transit.gre_tunnels.with_raw_response.get( - "", + gre_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_ipsec_tunnels.py b/tests/api_resources/magic_transit/test_ipsec_tunnels.py index 18965ec738e..ef622e4b728 100644 --- a/tests/api_resources/magic_transit/test_ipsec_tunnels.py +++ b/tests/api_resources/magic_transit/test_ipsec_tunnels.py @@ -98,7 +98,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -109,7 +109,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -131,7 +131,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -146,7 +146,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -164,7 +164,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -173,7 +173,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.update( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -221,7 +221,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) @@ -229,7 +229,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -256,20 +256,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) @@ -277,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -289,7 +289,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -304,20 +304,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.get( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_psk_generate(self, client: Cloudflare) -> None: ipsec_tunnel = client.magic_transit.ipsec_tunnels.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -326,7 +326,7 @@ def test_method_psk_generate(self, client: Cloudflare) -> None: @parametrize def test_raw_response_psk_generate(self, client: Cloudflare) -> None: response = client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -339,7 +339,7 @@ def test_raw_response_psk_generate(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: with client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -355,14 +355,14 @@ def test_streaming_response_psk_generate(self, client: Cloudflare) -> None: def test_path_params_psk_generate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -445,7 +445,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -456,7 +456,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -478,7 +478,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -493,7 +493,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -511,7 +511,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -520,7 +520,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.update( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", cloudflare_endpoint="203.0.113.1", interface_address="192.0.2.0/31", @@ -568,7 +568,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelDeleteResponse, ipsec_tunnel, path=["response"]) @@ -576,7 +576,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -588,7 +588,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -603,20 +603,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.delete( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IPSECTunnelGetResponse, ipsec_tunnel, path=["response"]) @@ -624,7 +624,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -636,7 +636,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -651,20 +651,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.get( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: ipsec_tunnel = await async_client.magic_transit.ipsec_tunnels.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -673,7 +673,7 @@ async def test_method_psk_generate(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -686,7 +686,7 @@ async def test_raw_response_psk_generate(self, async_client: AsyncCloudflare) -> @parametrize async def test_streaming_response_psk_generate(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.ipsec_tunnels.with_streaming_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -702,14 +702,14 @@ async def test_streaming_response_psk_generate(self, async_client: AsyncCloudfla async def test_path_params_psk_generate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "023e105f4ecef8ad9ca31a8372d0c353", + ipsec_tunnel_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ipsec_tunnel_id` but received ''"): await async_client.magic_transit.ipsec_tunnels.with_raw_response.psk_generate( - "", + ipsec_tunnel_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) diff --git a/tests/api_resources/magic_transit/test_routes.py b/tests/api_resources/magic_transit/test_routes.py index c72aba2ffde..109d3b9f025 100644 --- a/tests/api_resources/magic_transit/test_routes.py +++ b/tests/api_resources/magic_transit/test_routes.py @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: route = client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -84,7 +84,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: route = client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -101,7 +101,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -116,7 +116,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -134,7 +134,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -143,7 +143,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.magic_transit.routes.with_raw_response.update( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -191,7 +191,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: route = client.magic_transit.routes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteDeleteResponse, route, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,13 +226,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.magic_transit.routes.with_raw_response.delete( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -277,7 +277,7 @@ def test_path_params_empty(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: route = client.magic_transit.routes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteGetResponse, route, path=["response"]) @@ -285,7 +285,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -297,7 +297,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.routes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -312,13 +312,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.magic_transit.routes.with_raw_response.get( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -375,7 +375,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -386,7 +386,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -403,7 +403,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -418,7 +418,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -436,7 +436,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -445,7 +445,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.update( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", nexthop="203.0.113.1", prefix="192.0.2.0/24", @@ -493,7 +493,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteDeleteResponse, route, path=["response"]) @@ -501,7 +501,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -513,7 +513,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -528,13 +528,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.delete( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -579,7 +579,7 @@ async def test_path_params_empty(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: route = await async_client.magic_transit.routes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RouteGetResponse, route, path=["response"]) @@ -587,7 +587,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -599,7 +599,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.routes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -614,12 +614,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + route_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.magic_transit.routes.with_raw_response.get( - "", + route_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py index ea1cafd24af..e4556c64f70 100644 --- a/tests/api_resources/magic_transit/test_sites.py +++ b/tests/api_resources/magic_transit/test_sites.py @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", name="site_1", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", ha_mode=True, location={ "lat": "37.6192", @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: site = client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -89,10 +89,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -117,7 +117,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -132,13 +132,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,7 +191,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: site = client.magic_transit.sites.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,20 +226,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: site = client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -247,10 +247,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: site = client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -263,7 +263,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -275,7 +275,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -290,20 +290,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.edit( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: site = client.magic_transit.sites.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -311,7 +311,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -323,7 +323,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.magic_transit.sites.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -338,13 +338,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.magic_transit.sites.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -366,7 +366,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", name="site_1", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", ha_mode=True, location={ "lat": "37.6192", @@ -413,7 +413,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -421,10 +421,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -437,7 +437,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -449,7 +449,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -464,13 +464,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -523,7 +523,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -531,7 +531,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -543,7 +543,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -558,20 +558,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -579,10 +579,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", connector_id="ac60d3d0435248289d446cedd870bcf4", - description="string", + description="description", location={ "lat": "37.6192", "lon": "122.3816", @@ -595,7 +595,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -607,7 +607,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -622,20 +622,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.edit( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: site = await async_client.magic_transit.sites.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Site, site, path=["response"]) @@ -643,7 +643,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -655,7 +655,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.magic_transit.sites.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -670,12 +670,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.magic_transit.sites.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/mtls_certificates/test_associations.py b/tests/api_resources/mtls_certificates/test_associations.py index cce75fc9fec..8c28a978c39 100644 --- a/tests/api_resources/mtls_certificates/test_associations.py +++ b/tests/api_resources/mtls_certificates/test_associations.py @@ -20,7 +20,7 @@ class TestAssociations: @parametrize def test_method_get(self, client: Cloudflare) -> None: association = client.mtls_certificates.associations.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.mtls_certificates.associations.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.associations.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncAssociations: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: association = await async_client.mtls_certificates.associations.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AssociationGetResponse], association, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.associations.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.mtls_certificates.associations.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.associations.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index 4277e406662..ccaf45b9b4e 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -110,7 +110,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -145,20 +145,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -166,7 +166,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -178,7 +178,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -294,7 +294,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -314,7 +314,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -329,20 +329,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -350,7 +350,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -377,12 +377,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.certificates.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py index 0bb7b13f294..1e361bb8ee9 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -65,7 +65,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname = client.origin_tls_client_auth.hostnames.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) @@ -73,7 +73,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -85,7 +85,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.hostnames.with_streaming_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -100,13 +100,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): client.origin_tls_client_auth.hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -159,7 +159,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.origin_tls_client_auth.hostnames.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AuthenticatedOriginPull], hostname, path=["response"]) @@ -167,7 +167,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -179,7 +179,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.hostnames.with_streaming_response.get( - "app.example.com", + hostname="app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -194,12 +194,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( - "app.example.com", + hostname="app.example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `hostname` but received ''"): await async_client.origin_tls_client_auth.hostnames.with_raw_response.get( - "", + hostname="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index 74e8e45713e..1af65b2ef8f 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -78,7 +78,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: connection = client.page_shield.connections.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Connection], connection, path=["response"]) @@ -86,7 +86,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -98,7 +98,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.connections.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -113,13 +113,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connection_id` but received ''"): client.page_shield.connections.with_raw_response.get( - "", + connection_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connection = await async_client.page_shield.connections.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Connection], connection, path=["response"]) @@ -195,7 +195,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -207,7 +207,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.connections.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -222,12 +222,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.connections.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + connection_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connection_id` but received ''"): await async_client.page_shield.connections.with_raw_response.get( - "", + connection_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_cookies.py b/tests/api_resources/page_shield/test_cookies.py index 7c516ab4e7d..d3008ff641a 100644 --- a/tests/api_resources/page_shield/test_cookies.py +++ b/tests/api_resources/page_shield/test_cookies.py @@ -80,7 +80,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: cookie = client.page_shield.cookies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CookieGetResponse], cookie, path=["response"]) @@ -88,7 +88,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.cookies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -115,13 +115,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cookie_id` but received ''"): client.page_shield.cookies.with_raw_response.get( - "", + cookie_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -191,7 +191,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: cookie = await async_client.page_shield.cookies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CookieGetResponse], cookie, path=["response"]) @@ -199,7 +199,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.cookies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,12 +226,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.cookies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + cookie_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `cookie_id` but received ''"): await async_client.page_shield.cookies.with_raw_response.get( - "", + cookie_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index d2ff101721c..375863ad9b6 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -84,7 +84,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="allow", description="Checkout page CSP policy", @@ -105,7 +105,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -117,7 +117,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -132,13 +132,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.page_shield.policies.with_raw_response.update( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -183,7 +183,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.page_shield.policies.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert policy is None @@ -191,7 +191,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -203,7 +203,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -218,20 +218,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.page_shield.policies.with_raw_response.delete( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.page_shield.policies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -239,7 +239,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -251,7 +251,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.policies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -266,13 +266,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.page_shield.policies.with_raw_response.get( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -341,7 +341,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="allow", description="Checkout page CSP policy", @@ -362,7 +362,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -374,7 +374,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -389,13 +389,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.policies.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.page_shield.policies.with_raw_response.update( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -440,7 +440,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert policy is None @@ -448,7 +448,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -460,7 +460,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -475,20 +475,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.policies.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.page_shield.policies.with_raw_response.delete( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -496,7 +496,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -508,7 +508,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.policies.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -523,12 +523,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.policies.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + policy_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.page_shield.policies.with_raw_response.get( - "", + policy_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index c874f315be8..f8a9077bccf 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -79,7 +79,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: script = client.page_shield.scripts.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptGetResponse], script, path=["response"]) @@ -87,7 +87,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -99,7 +99,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.page_shield.scripts.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -114,13 +114,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_id` but received ''"): client.page_shield.scripts.with_raw_response.get( - "", + script_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: script = await async_client.page_shield.scripts.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptGetResponse], script, path=["response"]) @@ -197,7 +197,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.page_shield.scripts.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -224,12 +224,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.page_shield.scripts.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + script_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_id` but received ''"): await async_client.page_shield.scripts.with_raw_response.get( - "", + script_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/pages/projects/deployments/history/test_logs.py b/tests/api_resources/pages/projects/deployments/history/test_logs.py index 03612af99fe..db7215a143b 100644 --- a/tests/api_resources/pages/projects/deployments/history/test_logs.py +++ b/tests/api_resources/pages/projects/deployments/history/test_logs.py @@ -20,7 +20,7 @@ class TestLogs: @parametrize def test_method_get(self, client: Cloudflare) -> None: log = client.pages.projects.deployments.history.logs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.deployments.history.logs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.history.logs.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -84,7 +84,7 @@ class TestAsyncLogs: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: log = await async_client.pages.projects.deployments.history.logs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -106,7 +106,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.history.logs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -122,21 +122,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.history.logs.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index 45e2f785dad..7c9203aa0c3 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -22,7 +22,7 @@ class TestDeployments: @parametrize def test_method_create(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Deployment, deployment, path=["response"]) @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", branch="staging", ) @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -54,7 +54,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -70,20 +70,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Deployment], deployment, path=["response"]) @@ -91,7 +91,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", env="preview", ) @@ -100,7 +100,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,20 +127,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -149,7 +149,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -162,7 +162,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -178,21 +178,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.delete( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -200,7 +200,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -209,7 +209,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -222,7 +222,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -238,21 +238,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -260,7 +260,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: @parametrize def test_method_retry(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -270,7 +270,7 @@ def test_method_retry(self, client: Cloudflare) -> None: @parametrize def test_raw_response_retry(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -284,7 +284,7 @@ def test_raw_response_retry(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_retry(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -301,7 +301,7 @@ def test_streaming_response_retry(self, client: Cloudflare) -> None: def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -309,7 +309,7 @@ def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -317,7 +317,7 @@ def test_path_params_retry(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.retry( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -326,7 +326,7 @@ def test_path_params_retry(self, client: Cloudflare) -> None: @parametrize def test_method_rollback(self, client: Cloudflare) -> None: deployment = client.pages.projects.deployments.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -336,7 +336,7 @@ def test_method_rollback(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rollback(self, client: Cloudflare) -> None: response = client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -350,7 +350,7 @@ def test_raw_response_rollback(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rollback(self, client: Cloudflare) -> None: with client.pages.projects.deployments.with_streaming_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -367,7 +367,7 @@ def test_streaming_response_rollback(self, client: Cloudflare) -> None: def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -375,7 +375,7 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -383,7 +383,7 @@ def test_path_params_rollback(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): client.pages.projects.deployments.with_raw_response.rollback( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -397,7 +397,7 @@ class TestAsyncDeployments: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Deployment, deployment, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", branch="staging", ) @@ -416,7 +416,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -429,7 +429,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -445,20 +445,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Deployment], deployment, path=["response"]) @@ -466,7 +466,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", env="preview", ) @@ -475,7 +475,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -487,7 +487,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -502,20 +502,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -524,7 +524,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -537,7 +537,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -553,21 +553,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.delete( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -575,7 +575,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -584,7 +584,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -597,7 +597,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -613,21 +613,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.get( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -635,7 +635,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_retry(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -645,7 +645,7 @@ async def test_method_retry(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -659,7 +659,7 @@ async def test_raw_response_retry(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_retry(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -676,7 +676,7 @@ async def test_streaming_response_retry(self, async_client: AsyncCloudflare) -> async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -684,7 +684,7 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.retry( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -692,7 +692,7 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.retry( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -701,7 +701,7 @@ async def test_path_params_retry(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_rollback(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.pages.projects.deployments.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -711,7 +711,7 @@ async def test_method_rollback(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -725,7 +725,7 @@ async def test_raw_response_rollback(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_streaming_response_rollback(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.deployments.with_streaming_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -742,7 +742,7 @@ async def test_streaming_response_rollback(self, async_client: AsyncCloudflare) async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", project_name="this-is-my-project-01", body={}, @@ -750,7 +750,7 @@ async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.deployments.with_raw_response.rollback( - "023e105f4ecef8ad9ca31a8372d0c353", + deployment_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -758,7 +758,7 @@ async def test_path_params_rollback(self, async_client: AsyncCloudflare) -> None with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): await async_client.pages.projects.deployments.with_raw_response.rollback( - "", + deployment_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py index 6fb601b3070..d99095ae14e 100644 --- a/tests/api_resources/pages/projects/test_domains.py +++ b/tests/api_resources/pages/projects/test_domains.py @@ -25,7 +25,7 @@ class TestDomains: @parametrize def test_method_create(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -47,7 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) as response: @@ -63,14 +63,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={"name": "example.com"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -78,7 +78,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[object], domain, path=["response"]) @@ -86,7 +86,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -98,7 +98,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -113,20 +113,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -148,7 +148,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -164,21 +164,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.pages.projects.domains.with_raw_response.delete( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -186,7 +186,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -196,7 +196,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -210,7 +210,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -227,7 +227,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", body={}, @@ -235,7 +235,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -243,7 +243,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.pages.projects.domains.with_raw_response.edit( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -252,7 +252,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.pages.projects.domains.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -261,7 +261,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -274,7 +274,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.domains.with_streaming_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -290,21 +290,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.pages.projects.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -316,7 +316,7 @@ class TestAsyncDomains: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -325,7 +325,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -338,7 +338,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) as response: @@ -354,14 +354,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.domains.with_raw_response.create( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={"name": "example.com"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.create( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"name": "example.com"}, ) @@ -369,7 +369,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) @@ -377,7 +377,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -389,7 +389,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -404,20 +404,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.domains.with_raw_response.list( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.list( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -426,7 +426,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -439,7 +439,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -455,21 +455,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.delete( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.delete( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -477,7 +477,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -487,7 +487,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -501,7 +501,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -518,7 +518,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", body={}, @@ -526,7 +526,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.edit( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", body={}, @@ -534,7 +534,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.edit( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", body={}, @@ -543,7 +543,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.pages.projects.domains.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -552,7 +552,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) @@ -565,7 +565,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.domains.with_streaming_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) as response: @@ -581,21 +581,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="", project_name="this-is-my-project-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.get( - "this-is-my-domain-01.com", + domain_name="this-is-my-domain-01.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.pages.projects.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", project_name="this-is-my-project-01", ) diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index c3f969b628b..44ce71019b1 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -191,7 +191,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: project = client.pages.projects.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,20 +226,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.delete( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: project = client.pages.projects.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -263,7 +263,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -291,7 +291,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -322,7 +322,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={ "deployment_configs": { @@ -344,7 +344,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.edit( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -367,7 +367,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: project = client.pages.projects.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Project, project, path=["response"]) @@ -375,7 +375,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -387,7 +387,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -402,20 +402,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.get( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_purge_build_cache(self, client: Cloudflare) -> None: project = client.pages.projects.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -423,7 +423,7 @@ def test_method_purge_build_cache(self, client: Cloudflare) -> None: @parametrize def test_raw_response_purge_build_cache(self, client: Cloudflare) -> None: response = client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -435,7 +435,7 @@ def test_raw_response_purge_build_cache(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_build_cache(self, client: Cloudflare) -> None: with client.pages.projects.with_streaming_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -450,13 +450,13 @@ def test_streaming_response_purge_build_cache(self, client: Cloudflare) -> None: def test_path_params_purge_build_cache(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): client.pages.projects.with_raw_response.purge_build_cache( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -632,7 +632,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -640,7 +640,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -652,7 +652,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -667,20 +667,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.with_raw_response.delete( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.delete( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -704,7 +704,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -732,7 +732,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -763,7 +763,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.with_raw_response.edit( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", body={ "deployment_configs": { @@ -785,7 +785,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.edit( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "deployment_configs": { @@ -808,7 +808,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Project, project, path=["response"]) @@ -816,7 +816,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -828,7 +828,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -843,20 +843,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.with_raw_response.get( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.get( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_purge_build_cache(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, project, path=["response"]) @@ -864,7 +864,7 @@ async def test_method_purge_build_cache(self, async_client: AsyncCloudflare) -> @parametrize async def test_raw_response_purge_build_cache(self, async_client: AsyncCloudflare) -> None: response = await async_client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -876,7 +876,7 @@ async def test_raw_response_purge_build_cache(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_purge_build_cache(self, async_client: AsyncCloudflare) -> None: async with async_client.pages.projects.with_streaming_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -891,12 +891,12 @@ async def test_streaming_response_purge_build_cache(self, async_client: AsyncClo async def test_path_params_purge_build_cache(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pages.projects.with_raw_response.purge_build_cache( - "this-is-my-project-01", + project_name="this-is-my-project-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `project_name` but received ''"): await async_client.pages.projects.with_raw_response.purge_build_cache( - "", + project_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/pcaps/test_download.py b/tests/api_resources/pcaps/test_download.py index ee286a6f414..95dae97f261 100644 --- a/tests/api_resources/pcaps/test_download.py +++ b/tests/api_resources/pcaps/test_download.py @@ -30,7 +30,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.pcaps.download.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -46,7 +46,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -62,7 +62,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.pcaps.download.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -79,13 +79,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): client.pcaps.download.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.pcaps.download.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert download.is_closed @@ -116,7 +116,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) download = await async_client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.pcaps.download.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as download: assert not download.is_closed @@ -149,12 +149,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pcaps.download.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): await async_client.pcaps.download.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/pcaps/test_ownership.py b/tests/api_resources/pcaps/test_ownership.py index b1032e3d9e3..e6854449f2d 100644 --- a/tests/api_resources/pcaps/test_ownership.py +++ b/tests/api_resources/pcaps/test_ownership.py @@ -62,7 +62,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ownership = client.pcaps.ownership.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert ownership is None @@ -70,7 +70,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -82,7 +82,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.pcaps.ownership.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -97,13 +97,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ownership_id` but received ''"): client.pcaps.ownership.with_raw_response.delete( - "", + ownership_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -240,7 +240,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ownership = await async_client.pcaps.ownership.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert ownership is None @@ -248,7 +248,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.ownership.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -275,13 +275,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pcaps.ownership.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + ownership_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ownership_id` but received ''"): await async_client.pcaps.ownership.with_raw_response.delete( - "", + ownership_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/queues/test_consumers.py b/tests/api_resources/queues/test_consumers.py index 39efe21c453..4cca547cf8c 100644 --- a/tests/api_resources/queues/test_consumers.py +++ b/tests/api_resources/queues/test_consumers.py @@ -25,7 +25,7 @@ class TestConsumers: @parametrize def test_method_create(self, client: Cloudflare) -> None: consumer = client.queues.consumers.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -44,7 +44,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -67,7 +67,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={ "dead_letter_queue": "example-dlq", @@ -110,7 +110,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.create( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -128,7 +128,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: consumer = client.queues.consumers.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -143,7 +143,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -162,7 +162,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -184,7 +184,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -197,7 +197,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", body={ @@ -210,7 +210,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): client.queues.consumers.with_raw_response.update( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -224,7 +224,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: consumer = client.queues.consumers.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -233,7 +233,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -246,7 +246,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -262,21 +262,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): client.queues.consumers.with_raw_response.delete( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: consumer = client.queues.consumers.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) @@ -292,7 +292,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -304,7 +304,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.queues.consumers.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -319,13 +319,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.consumers.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -336,7 +336,7 @@ class TestAsyncConsumers: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -355,7 +355,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -378,7 +378,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -404,7 +404,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.consumers.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={ "dead_letter_queue": "example-dlq", @@ -421,7 +421,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.create( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={ "dead_letter_queue": "example-dlq", @@ -439,7 +439,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -454,7 +454,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -473,7 +473,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -495,7 +495,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -508,7 +508,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", body={ @@ -521,7 +521,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): await async_client.queues.consumers.with_raw_response.update( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", body={ @@ -535,7 +535,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -544,7 +544,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -557,7 +557,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -573,21 +573,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + consumer_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `consumer_id` but received ''"): await async_client.queues.consumers.with_raw_response.delete( - "", + consumer_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", queue_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -595,7 +595,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: consumer = await async_client.queues.consumers.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ConsumerGetResponse], consumer, path=["response"]) @@ -603,7 +603,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -615,7 +615,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.consumers.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -630,12 +630,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.consumers.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.consumers.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/queues/test_messages.py b/tests/api_resources/queues/test_messages.py index 709728a1ff1..6052877da88 100644 --- a/tests/api_resources/queues/test_messages.py +++ b/tests/api_resources/queues/test_messages.py @@ -20,7 +20,7 @@ class TestMessages: @parametrize def test_method_ack(self, client: Cloudflare) -> None: message = client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) @@ -28,7 +28,7 @@ def test_method_ack(self, client: Cloudflare) -> None: @parametrize def test_method_ack_with_all_params(self, client: Cloudflare) -> None: message = client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", acks=[ { @@ -61,7 +61,7 @@ def test_method_ack_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_ack(self, client: Cloudflare) -> None: response = client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -73,7 +73,7 @@ def test_raw_response_ack(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_ack(self, client: Cloudflare) -> None: with client.queues.messages.with_streaming_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -88,20 +88,20 @@ def test_streaming_response_ack(self, client: Cloudflare) -> None: def test_path_params_ack(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.messages.with_raw_response.ack( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_pull(self, client: Cloudflare) -> None: message = client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) @@ -109,7 +109,7 @@ def test_method_pull(self, client: Cloudflare) -> None: @parametrize def test_method_pull_with_all_params(self, client: Cloudflare) -> None: message = client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", batch_size=10, visibility_timeout_ms=1000, @@ -119,7 +119,7 @@ def test_method_pull_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_pull(self, client: Cloudflare) -> None: response = client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_pull(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_pull(self, client: Cloudflare) -> None: with client.queues.messages.with_streaming_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -146,13 +146,13 @@ def test_streaming_response_pull(self, client: Cloudflare) -> None: def test_path_params_pull(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.messages.with_raw_response.pull( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -163,7 +163,7 @@ class TestAsyncMessages: @parametrize async def test_method_ack(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessageAckResponse], message, path=["response"]) @@ -171,7 +171,7 @@ async def test_method_ack(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_ack_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", acks=[ { @@ -204,7 +204,7 @@ async def test_method_ack_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_ack(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ async def test_raw_response_ack(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_ack(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.messages.with_streaming_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -231,20 +231,20 @@ async def test_streaming_response_ack(self, async_client: AsyncCloudflare) -> No async def test_path_params_ack(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.messages.with_raw_response.ack( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.messages.with_raw_response.ack( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_pull(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MessagePullResponse], message, path=["response"]) @@ -252,7 +252,7 @@ async def test_method_pull(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_pull_with_all_params(self, async_client: AsyncCloudflare) -> None: message = await async_client.queues.messages.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", batch_size=10, visibility_timeout_ms=1000, @@ -262,7 +262,7 @@ async def test_method_pull_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_pull(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -274,7 +274,7 @@ async def test_raw_response_pull(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_pull(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.messages.with_streaming_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -289,12 +289,12 @@ async def test_streaming_response_pull(self, async_client: AsyncCloudflare) -> N async def test_path_params_pull(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.messages.with_raw_response.pull( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.messages.with_raw_response.pull( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/r2/test_buckets.py b/tests/api_resources/r2/test_buckets.py index 0b1049530c9..491c61664c1 100644 --- a/tests/api_resources/r2/test_buckets.py +++ b/tests/api_resources/r2/test_buckets.py @@ -81,7 +81,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: bucket = client.r2.buckets.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - cursor="string", + cursor="cursor", direction="desc", name_contains="my-bucket", order="name", @@ -124,7 +124,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: bucket = client.r2.buckets.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, bucket, path=["response"]) @@ -132,7 +132,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -144,7 +144,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -159,20 +159,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.buckets.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: bucket = client.r2.buckets.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Bucket, bucket, path=["response"]) @@ -180,7 +180,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -192,7 +192,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.r2.buckets.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -207,13 +207,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.buckets.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -284,7 +284,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", - cursor="string", + cursor="cursor", direction="desc", name_contains="my-bucket", order="name", @@ -327,7 +327,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, bucket, path=["response"]) @@ -335,7 +335,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -347,7 +347,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -362,20 +362,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.r2.buckets.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.buckets.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bucket = await async_client.r2.buckets.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Bucket, bucket, path=["response"]) @@ -383,7 +383,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -395,7 +395,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.buckets.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -410,12 +410,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.r2.buckets.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.buckets.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/r2/test_sippy.py b/tests/api_resources/r2/test_sippy.py index b3005ce3cc9..fa63c6f67c9 100644 --- a/tests/api_resources/r2/test_sippy.py +++ b/tests/api_resources/r2/test_sippy.py @@ -20,7 +20,7 @@ class TestSippy: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -28,19 +28,19 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "access_key_id": "string", - "bucket": "string", + "access_key_id": "accessKeyId", + "bucket": "bucket", "provider": "aws", - "region": "string", - "secret_access_key": "string", + "region": "region", + "secret_access_key": "secretAccessKey", }, ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -48,7 +48,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -60,7 +60,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -75,20 +75,20 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -96,17 +96,17 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: sippy = client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "bucket": "string", - "client_email": "string", - "private_key": "string", + "bucket": "bucket", + "client_email": "clientEmail", + "private_key": "privateKey", "provider": "gcs", }, ) @@ -115,7 +115,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -127,7 +127,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -142,20 +142,20 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: sippy = client.r2.sippy.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) @@ -163,7 +163,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -175,7 +175,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -190,20 +190,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: sippy = client.r2.sippy.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -211,7 +211,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.r2.sippy.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): client.r2.sippy.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -255,7 +255,7 @@ class TestAsyncSippy: @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -263,19 +263,19 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "access_key_id": "string", - "bucket": "string", + "access_key_id": "accessKeyId", + "bucket": "bucket", "provider": "aws", - "region": "string", - "secret_access_key": "string", + "region": "region", + "secret_access_key": "secretAccessKey", }, ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -283,7 +283,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -295,7 +295,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -310,20 +310,20 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -331,17 +331,17 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", destination={ - "access_key_id": "string", + "access_key_id": "accessKeyId", "provider": "r2", - "secret_access_key": "string", + "secret_access_key": "secretAccessKey", }, source={ - "bucket": "string", - "client_email": "string", - "private_key": "string", + "bucket": "bucket", + "client_email": "clientEmail", + "private_key": "privateKey", "provider": "gcs", }, ) @@ -350,7 +350,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -377,20 +377,20 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.update( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SippyDeleteResponse, sippy, path=["response"]) @@ -398,7 +398,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -410,7 +410,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -425,20 +425,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.r2.sippy.with_raw_response.delete( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.delete( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: sippy = await async_client.r2.sippy.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Sippy, sippy, path=["response"]) @@ -446,7 +446,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -458,7 +458,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.r2.sippy.with_streaming_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -473,12 +473,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.r2.sippy.with_raw_response.get( - "example-bucket", + bucket_name="example-bucket", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bucket_name` but received ''"): await async_client.r2.sippy.with_raw_response.get( - "", + bucket_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/radar/as112/test_top.py b/tests/api_resources/radar/as112/test_top.py index 43a3546a5de..a97851a7967 100644 --- a/tests/api_resources/radar/as112/test_top.py +++ b/tests/api_resources/radar/as112/test_top.py @@ -26,14 +26,14 @@ class TestTop: @parametrize def test_method_dnssec(self, client: Cloudflare) -> None: top = client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) @parametrize def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -57,7 +57,7 @@ def test_method_dnssec_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_dnssec(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert response.is_closed is True @@ -68,7 +68,7 @@ def test_raw_response_dnssec(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_dnssec(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -81,14 +81,14 @@ def test_streaming_response_dnssec(self, client: Cloudflare) -> None: @parametrize def test_method_edns(self, client: Cloudflare) -> None: top = client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert_matches_type(TopEdnsResponse, top, path=["response"]) @parametrize def test_method_edns_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -112,7 +112,7 @@ def test_method_edns_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edns(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert response.is_closed is True @@ -123,7 +123,7 @@ def test_raw_response_edns(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edns(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -136,14 +136,14 @@ def test_streaming_response_edns(self, client: Cloudflare) -> None: @parametrize def test_method_ip_version(self, client: Cloudflare) -> None: top = client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) @parametrize def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: top = client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -167,7 +167,7 @@ def test_method_ip_version_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_ip_version(self, client: Cloudflare) -> None: response = client.radar.as112.top.with_raw_response.ip_version( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -178,7 +178,7 @@ def test_raw_response_ip_version(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_ip_version(self, client: Cloudflare) -> None: with client.radar.as112.top.with_streaming_response.ip_version( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -243,14 +243,14 @@ class TestAsyncTop: @parametrize async def test_method_dnssec(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert_matches_type(TopDNSSECResponse, top, path=["response"]) @parametrize async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -274,7 +274,7 @@ async def test_method_dnssec_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) assert response.is_closed is True @@ -285,7 +285,7 @@ async def test_raw_response_dnssec(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.dnssec( - "SUPPORTED", + dnssec="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -298,14 +298,14 @@ async def test_streaming_response_dnssec(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_edns(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert_matches_type(TopEdnsResponse, top, path=["response"]) @parametrize async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.edns( - "SUPPORTED", + edns="SUPPORTED", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -329,7 +329,7 @@ async def test_method_edns_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) assert response.is_closed is True @@ -340,7 +340,7 @@ async def test_raw_response_edns(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.edns( - "SUPPORTED", + edns="SUPPORTED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -353,14 +353,14 @@ async def test_streaming_response_edns(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_ip_version(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", ) assert_matches_type(TopIPVersionResponse, top, path=["response"]) @parametrize async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudflare) -> None: top = await async_client.radar.as112.top.ip_version( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], continent=["string", "string", "string"], date_end=[ @@ -384,7 +384,7 @@ async def test_method_ip_version_with_all_params(self, async_client: AsyncCloudf @parametrize async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.as112.top.with_raw_response.ip_version( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -395,7 +395,7 @@ async def test_raw_response_ip_version(self, async_client: AsyncCloudflare) -> N @parametrize async def test_streaming_response_ip_version(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.as112.top.with_streaming_response.ip_version( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/bgp/hijacks/test_events.py b/tests/api_resources/radar/bgp/hijacks/test_events.py index 806bea3adbe..950799cb558 100644 --- a/tests/api_resources/radar/bgp/hijacks/test_events.py +++ b/tests/api_resources/radar/bgp/hijacks/test_events.py @@ -34,7 +34,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: format="JSON", hijacker_asn=0, involved_asn=0, - involved_country="string", + involved_country="involvedCountry", max_confidence=0, min_confidence=0, page=0, @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) format="JSON", hijacker_asn=0, involved_asn=0, - involved_country="string", + involved_country="involvedCountry", max_confidence=0, min_confidence=0, page=0, diff --git a/tests/api_resources/radar/bgp/leaks/test_events.py b/tests/api_resources/radar/bgp/leaks/test_events.py index 8c4feb02045..03b6644d96e 100644 --- a/tests/api_resources/radar/bgp/leaks/test_events.py +++ b/tests/api_resources/radar/bgp/leaks/test_events.py @@ -33,7 +33,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: event_id=0, format="JSON", involved_asn=0, - involved_country="string", + involved_country="involvedCountry", leak_asn=0, page=0, per_page=0, @@ -80,7 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) event_id=0, format="JSON", involved_asn=0, - involved_country="string", + involved_country="involvedCountry", leak_asn=0, page=0, per_page=0, diff --git a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py index 52b80c305fa..47f0c6b92ca 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_malicious.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_malicious.py @@ -21,14 +21,14 @@ class TestMalicious: @parametrize def test_method_get(self, client: Cloudflare) -> None: malicious = client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: malicious = client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -55,7 +55,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.malicious.with_raw_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.malicious.with_streaming_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ class TestAsyncMalicious: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: malicious = await async_client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert_matches_type(MaliciousGetResponse, malicious, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: malicious = await async_client.radar.email.security.top.tlds.malicious.get( - "MALICIOUS", + malicious="MALICIOUS", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -117,7 +117,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.malicious.with_raw_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) assert response.is_closed is True @@ -128,7 +128,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.malicious.with_streaming_response.get( - "MALICIOUS", + malicious="MALICIOUS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spam.py b/tests/api_resources/radar/email/security/top/tlds/test_spam.py index b1d72e3f234..d8ea7caf83c 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spam.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spam.py @@ -21,14 +21,14 @@ class TestSpam: @parametrize def test_method_get(self, client: Cloudflare) -> None: spam = client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", ) assert_matches_type(SpamGetResponse, spam, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: spam = client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -55,7 +55,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.spam.with_raw_response.get( - "SPAM", + spam="SPAM", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.spam.with_streaming_response.get( - "SPAM", + spam="SPAM", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ class TestAsyncSpam: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: spam = await async_client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", ) assert_matches_type(SpamGetResponse, spam, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: spam = await async_client.radar.email.security.top.tlds.spam.get( - "SPAM", + spam="SPAM", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -117,7 +117,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.spam.with_raw_response.get( - "SPAM", + spam="SPAM", ) assert response.is_closed is True @@ -128,7 +128,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.spam.with_streaming_response.get( - "SPAM", + spam="SPAM", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py index e18cd2bc350..552471930fd 100644 --- a/tests/api_resources/radar/email/security/top/tlds/test_spoof.py +++ b/tests/api_resources/radar/email/security/top/tlds/test_spoof.py @@ -21,14 +21,14 @@ class TestSpoof: @parametrize def test_method_get(self, client: Cloudflare) -> None: spoof = client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: spoof = client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -55,7 +55,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.email.security.top.tlds.spoof.with_raw_response.get( - "SPOOF", + spoof="SPOOF", ) assert response.is_closed is True @@ -66,7 +66,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.email.security.top.tlds.spoof.with_streaming_response.get( - "SPOOF", + spoof="SPOOF", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -83,14 +83,14 @@ class TestAsyncSpoof: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: spoof = await async_client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", ) assert_matches_type(SpoofGetResponse, spoof, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: spoof = await async_client.radar.email.security.top.tlds.spoof.get( - "SPOOF", + spoof="SPOOF", arc=["PASS", "NONE", "FAIL"], date_end=[ parse_datetime("2019-12-27T18:11:19.117Z"), @@ -117,7 +117,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.email.security.top.tlds.spoof.with_raw_response.get( - "SPOOF", + spoof="SPOOF", ) assert response.is_closed is True @@ -128,7 +128,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.email.security.top.tlds.spoof.with_streaming_response.get( - "SPOOF", + spoof="SPOOF", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/entities/test_asns.py b/tests/api_resources/radar/entities/test_asns.py index 0a1ad904dc7..78555b0de2d 100644 --- a/tests/api_resources/radar/entities/test_asns.py +++ b/tests/api_resources/radar/entities/test_asns.py @@ -62,14 +62,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.get( - 3, + asn=3, ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.get( - 3, + asn=3, format="JSON", ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @@ -77,7 +77,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.get( - 3, + asn=3, ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.get( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,14 +140,14 @@ def test_streaming_response_ip(self, client: Cloudflare) -> None: @parametrize def test_method_rel(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.rel( - 3, + asn=3, ) assert_matches_type(ASNRelResponse, asn, path=["response"]) @parametrize def test_method_rel_with_all_params(self, client: Cloudflare) -> None: asn = client.radar.entities.asns.rel( - 3, + asn=3, asn2=0, format="JSON", ) @@ -156,7 +156,7 @@ def test_method_rel_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rel(self, client: Cloudflare) -> None: response = client.radar.entities.asns.with_raw_response.rel( - 3, + asn=3, ) assert response.is_closed is True @@ -167,7 +167,7 @@ def test_raw_response_rel(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rel(self, client: Cloudflare) -> None: with client.radar.entities.asns.with_streaming_response.rel( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,14 +221,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.get( - 3, + asn=3, ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.get( - 3, + asn=3, format="JSON", ) assert_matches_type(ASNGetResponse, asn, path=["response"]) @@ -236,7 +236,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.get( - 3, + asn=3, ) assert response.is_closed is True @@ -247,7 +247,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.get( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -299,14 +299,14 @@ async def test_streaming_response_ip(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_rel(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.rel( - 3, + asn=3, ) assert_matches_type(ASNRelResponse, asn, path=["response"]) @parametrize async def test_method_rel_with_all_params(self, async_client: AsyncCloudflare) -> None: asn = await async_client.radar.entities.asns.rel( - 3, + asn=3, asn2=0, format="JSON", ) @@ -315,7 +315,7 @@ async def test_method_rel_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_rel(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.asns.with_raw_response.rel( - 3, + asn=3, ) assert response.is_closed is True @@ -326,7 +326,7 @@ async def test_raw_response_rel(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_rel(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.asns.with_streaming_response.rel( - 3, + asn=3, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/entities/test_locations.py b/tests/api_resources/radar/entities/test_locations.py index 6cb88295e26..b7fedeea1e4 100644 --- a/tests/api_resources/radar/entities/test_locations.py +++ b/tests/api_resources/radar/entities/test_locations.py @@ -58,14 +58,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.radar.entities.locations.get( - "US", + location="US", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: location = client.radar.entities.locations.get( - "US", + location="US", format="JSON", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @@ -73,7 +73,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.entities.locations.with_raw_response.get( - "US", + location="US", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.entities.locations.with_streaming_response.get( - "US", + location="US", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,7 +98,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `location` but received ''"): client.radar.entities.locations.with_raw_response.get( - "", + location="", ) @@ -143,14 +143,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.get( - "US", + location="US", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.radar.entities.locations.get( - "US", + location="US", format="JSON", ) assert_matches_type(LocationGetResponse, location, path=["response"]) @@ -158,7 +158,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.entities.locations.with_raw_response.get( - "US", + location="US", ) assert response.is_closed is True @@ -169,7 +169,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.entities.locations.with_streaming_response.get( - "US", + location="US", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,5 +183,5 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `location` but received ''"): await async_client.radar.entities.locations.with_raw_response.get( - "", + location="", ) diff --git a/tests/api_resources/radar/http/ases/test_bot_class.py b/tests/api_resources/radar/http/ases/test_bot_class.py index 564e181cc75..43dfccdf6fa 100644 --- a/tests/api_resources/radar/http/ases/test_bot_class.py +++ b/tests/api_resources/radar/http/ases/test_bot_class.py @@ -21,14 +21,14 @@ class TestBotClass: @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_class = client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bot_class = client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBotClass: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.ases.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_browser_family.py b/tests/api_resources/radar/http/ases/test_browser_family.py index e518c1a525c..518b019bc9b 100644 --- a/tests/api_resources/radar/http/ases/test_browser_family.py +++ b/tests/api_resources/radar/http/ases/test_browser_family.py @@ -21,14 +21,14 @@ class TestBrowserFamily: @parametrize def test_method_get(self, client: Cloudflare) -> None: browser_family = client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: browser_family = client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBrowserFamily: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.ases.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_device_type.py b/tests/api_resources/radar/http/ases/test_device_type.py index 18a6ccfcaa8..82a48550643 100644 --- a/tests/api_resources/radar/http/ases/test_device_type.py +++ b/tests/api_resources/radar/http/ases/test_device_type.py @@ -21,14 +21,14 @@ class TestDeviceType: @parametrize def test_method_get(self, client: Cloudflare) -> None: device_type = client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: device_type = client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncDeviceType: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.ases.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_http_method.py b/tests/api_resources/radar/http/ases/test_http_method.py index b045223539b..69ab4182496 100644 --- a/tests/api_resources/radar/http/ases/test_http_method.py +++ b/tests/api_resources/radar/http/ases/test_http_method.py @@ -21,14 +21,14 @@ class TestHTTPMethod: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_method = client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_method = client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncHTTPMethod: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.ases.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_http_protocol.py b/tests/api_resources/radar/http/ases/test_http_protocol.py index b13753a4caf..8651316350b 100644 --- a/tests/api_resources/radar/http/ases/test_http_protocol.py +++ b/tests/api_resources/radar/http/ases/test_http_protocol.py @@ -21,14 +21,14 @@ class TestHTTPProtocol: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_protocol = client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_protocol = client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -58,7 +58,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -69,7 +69,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,14 +86,14 @@ class TestAsyncHTTPProtocol: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.ases.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -123,7 +123,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -134,7 +134,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_ip_version.py b/tests/api_resources/radar/http/ases/test_ip_version.py index 3e16cb9c9e7..f9abf302b8a 100644 --- a/tests/api_resources/radar/http/ases/test_ip_version.py +++ b/tests/api_resources/radar/http/ases/test_ip_version.py @@ -21,14 +21,14 @@ class TestIPVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_version = client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip_version = client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncIPVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.ases.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_os.py b/tests/api_resources/radar/http/ases/test_os.py index c0e46c14ef3..b06f72f2b6c 100644 --- a/tests/api_resources/radar/http/ases/test_os.py +++ b/tests/api_resources/radar/http/ases/test_os.py @@ -21,14 +21,14 @@ class TestOS: @parametrize def test_method_get(self, client: Cloudflare) -> None: os = client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: os = client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncOS: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.ases.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/ases/test_tls_version.py b/tests/api_resources/radar/http/ases/test_tls_version.py index 68e968ef510..1ee28eb9c84 100644 --- a/tests/api_resources/radar/http/ases/test_tls_version.py +++ b/tests/api_resources/radar/http/ases/test_tls_version.py @@ -21,14 +21,14 @@ class TestTLSVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_version = client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tls_version = client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.ases.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.ases.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncTLSVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.ases.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.ases.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.ases.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_bot_class.py b/tests/api_resources/radar/http/locations/test_bot_class.py index 93040e13c86..f80aa0f4018 100644 --- a/tests/api_resources/radar/http/locations/test_bot_class.py +++ b/tests/api_resources/radar/http/locations/test_bot_class.py @@ -21,14 +21,14 @@ class TestBotClass: @parametrize def test_method_get(self, client: Cloudflare) -> None: bot_class = client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bot_class = client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBotClass: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert_matches_type(BotClassGetResponse, bot_class, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bot_class = await async_client.radar.http.locations.bot_class.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", asn=["string", "string", "string"], browser_family=["CHROME", "EDGE", "FIREFOX"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.bot_class.with_raw_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.bot_class.with_streaming_response.get( - "LIKELY_AUTOMATED", + bot_class="LIKELY_AUTOMATED", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_browser_family.py b/tests/api_resources/radar/http/locations/test_browser_family.py index b0f7066f74d..07964a092a1 100644 --- a/tests/api_resources/radar/http/locations/test_browser_family.py +++ b/tests/api_resources/radar/http/locations/test_browser_family.py @@ -21,14 +21,14 @@ class TestBrowserFamily: @parametrize def test_method_get(self, client: Cloudflare) -> None: browser_family = client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: browser_family = client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncBrowserFamily: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", ) assert_matches_type(BrowserFamilyGetResponse, browser_family, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: browser_family = await async_client.radar.http.locations.browser_family.get( - "CHROME", + browser_family="CHROME", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], continent=["string", "string", "string"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.browser_family.with_raw_response.get( - "CHROME", + browser_family="CHROME", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.browser_family.with_streaming_response.get( - "CHROME", + browser_family="CHROME", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_device_type.py b/tests/api_resources/radar/http/locations/test_device_type.py index 3f4d5e56b40..15ae343d0f8 100644 --- a/tests/api_resources/radar/http/locations/test_device_type.py +++ b/tests/api_resources/radar/http/locations/test_device_type.py @@ -21,14 +21,14 @@ class TestDeviceType: @parametrize def test_method_get(self, client: Cloudflare) -> None: device_type = client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: device_type = client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncDeviceType: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", ) assert_matches_type(DeviceTypeGetResponse, device_type, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: device_type = await async_client.radar.http.locations.device_type.get( - "DESKTOP", + device_type="DESKTOP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.device_type.with_raw_response.get( - "DESKTOP", + device_type="DESKTOP", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.device_type.with_streaming_response.get( - "DESKTOP", + device_type="DESKTOP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_http_method.py b/tests/api_resources/radar/http/locations/test_http_method.py index 267001342c1..dd3f53d5eda 100644 --- a/tests/api_resources/radar/http/locations/test_http_method.py +++ b/tests/api_resources/radar/http/locations/test_http_method.py @@ -21,14 +21,14 @@ class TestHTTPMethod: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_method = client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_method = client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncHTTPMethod: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", ) assert_matches_type(HTTPMethodGetResponse, http_method, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_method = await async_client.radar.http.locations.http_method.get( - "HTTPv1", + http_version="HTTPv1", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.http_method.with_raw_response.get( - "HTTPv1", + http_version="HTTPv1", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.http_method.with_streaming_response.get( - "HTTPv1", + http_version="HTTPv1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_http_protocol.py b/tests/api_resources/radar/http/locations/test_http_protocol.py index 2a6a9294a30..8c5abee1834 100644 --- a/tests/api_resources/radar/http/locations/test_http_protocol.py +++ b/tests/api_resources/radar/http/locations/test_http_protocol.py @@ -21,14 +21,14 @@ class TestHTTPProtocol: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_protocol = client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_protocol = client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -58,7 +58,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -69,7 +69,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,14 +86,14 @@ class TestAsyncHTTPProtocol: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", ) assert_matches_type(HTTPProtocolGetResponse, http_protocol, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_protocol = await async_client.radar.http.locations.http_protocol.get( - "HTTP", + http_protocol="HTTP", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -123,7 +123,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.http_protocol.with_raw_response.get( - "HTTP", + http_protocol="HTTP", ) assert response.is_closed is True @@ -134,7 +134,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.http_protocol.with_streaming_response.get( - "HTTP", + http_protocol="HTTP", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_ip_version.py b/tests/api_resources/radar/http/locations/test_ip_version.py index fd6c5769745..47315faea87 100644 --- a/tests/api_resources/radar/http/locations/test_ip_version.py +++ b/tests/api_resources/radar/http/locations/test_ip_version.py @@ -21,14 +21,14 @@ class TestIPVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: ip_version = client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip_version = client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncIPVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", ) assert_matches_type(IPVersionGetResponse, ip_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip_version = await async_client.radar.http.locations.ip_version.get( - "IPv4", + ip_version="IPv4", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.ip_version.with_raw_response.get( - "IPv4", + ip_version="IPv4", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.ip_version.with_streaming_response.get( - "IPv4", + ip_version="IPv4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_os.py b/tests/api_resources/radar/http/locations/test_os.py index 98253fe4e0f..2006ca10d2d 100644 --- a/tests/api_resources/radar/http/locations/test_os.py +++ b/tests/api_resources/radar/http/locations/test_os.py @@ -21,14 +21,14 @@ class TestOS: @parametrize def test_method_get(self, client: Cloudflare) -> None: os = client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: os = client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncOS: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", ) assert_matches_type(OSGetResponse, os, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: os = await async_client.radar.http.locations.os.get( - "WINDOWS", + os="WINDOWS", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.os.with_raw_response.get( - "WINDOWS", + os="WINDOWS", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.os.with_streaming_response.get( - "WINDOWS", + os="WINDOWS", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/http/locations/test_tls_version.py b/tests/api_resources/radar/http/locations/test_tls_version.py index 10fbe092c1e..af160f32587 100644 --- a/tests/api_resources/radar/http/locations/test_tls_version.py +++ b/tests/api_resources/radar/http/locations/test_tls_version.py @@ -21,14 +21,14 @@ class TestTLSVersion: @parametrize def test_method_get(self, client: Cloudflare) -> None: tls_version = client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: tls_version = client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -59,7 +59,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.http.locations.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -70,7 +70,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.http.locations.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,14 +87,14 @@ class TestAsyncTLSVersion: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert_matches_type(TLSVersionGetResponse, tls_version, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: tls_version = await async_client.radar.http.locations.tls_version.get( - "TLSv1_0", + tls_version="TLSv1_0", asn=["string", "string", "string"], bot_class=["LIKELY_AUTOMATED", "LIKELY_HUMAN"], browser_family=["CHROME", "EDGE", "FIREFOX"], @@ -125,7 +125,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.http.locations.tls_version.with_raw_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) assert response.is_closed is True @@ -136,7 +136,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.http.locations.tls_version.with_streaming_response.get( - "TLSv1_0", + tls_version="TLSv1_0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/radar/ranking/test_domain.py b/tests/api_resources/radar/ranking/test_domain.py index 780aa445d02..058290c4c9f 100644 --- a/tests/api_resources/radar/ranking/test_domain.py +++ b/tests/api_resources/radar/ranking/test_domain.py @@ -20,14 +20,14 @@ class TestDomain: @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( - "google.com", + domain="google.com", ) assert_matches_type(DomainGetResponse, domain, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: domain = client.radar.ranking.domain.get( - "google.com", + domain="google.com", date=["string", "string", "string"], format="JSON", limit=5, @@ -39,7 +39,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.radar.ranking.domain.with_raw_response.get( - "google.com", + domain="google.com", ) assert response.is_closed is True @@ -50,7 +50,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.radar.ranking.domain.with_streaming_response.get( - "google.com", + domain="google.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain` but received ''"): client.radar.ranking.domain.with_raw_response.get( - "", + domain="", ) @@ -74,14 +74,14 @@ class TestAsyncDomain: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( - "google.com", + domain="google.com", ) assert_matches_type(DomainGetResponse, domain, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.radar.ranking.domain.get( - "google.com", + domain="google.com", date=["string", "string", "string"], format="JSON", limit=5, @@ -93,7 +93,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.radar.ranking.domain.with_raw_response.get( - "google.com", + domain="google.com", ) assert response.is_closed is True @@ -104,7 +104,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.radar.ranking.domain.with_streaming_response.get( - "google.com", + domain="google.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -118,5 +118,5 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain` but received ''"): await async_client.radar.ranking.domain.with_raw_response.get( - "", + domain="", ) diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py index 5c0d686188c..2418c2d157e 100644 --- a/tests/api_resources/registrar/test_domains.py +++ b/tests/api_resources/registrar/test_domains.py @@ -21,7 +21,7 @@ class TestDomains: @parametrize def test_method_update(self, client: Cloudflare) -> None: domain = client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: domain = client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_renew=True, locked=False, @@ -40,7 +40,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,13 +67,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.registrar.domains.with_raw_response.update( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -118,7 +118,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.registrar.domains.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) @@ -126,7 +126,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -138,7 +138,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.registrar.domains.with_streaming_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -153,13 +153,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): client.registrar.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -170,7 +170,7 @@ class TestAsyncDomains: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainUpdateResponse], domain, path=["response"]) @@ -178,7 +178,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_renew=True, locked=False, @@ -189,7 +189,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -201,7 +201,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.registrar.domains.with_streaming_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -216,13 +216,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.registrar.domains.with_raw_response.update( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.registrar.domains.with_raw_response.update( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -267,7 +267,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DomainGetResponse], domain, path=["response"]) @@ -275,7 +275,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -287,7 +287,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.registrar.domains.with_streaming_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -302,12 +302,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.registrar.domains.with_raw_response.get( - "cloudflare.com", + domain_name="cloudflare.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_name` but received ''"): await async_client.registrar.domains.with_raw_response.get( - "", + domain_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/request_tracers/test_traces.py b/tests/api_resources/request_tracers/test_traces.py index ce807ccc33d..92147ae93ba 100644 --- a/tests/api_resources/request_tracers/test_traces.py +++ b/tests/api_resources/request_tracers/test_traces.py @@ -35,21 +35,21 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: body={ "base64": "c29tZV9yZXF1ZXN0X2JvZHk=", "json": {}, - "plain_text": "string", + "plain_text": "plain_text", }, context={ "bot_score": 0, "geoloc": { "city": "London", - "continent": "string", + "continent": "continent", "is_eu_country": True, - "iso_code": "string", + "iso_code": "iso_code", "latitude": 0, "longitude": 0, - "postal_code": "string", - "region_code": "string", - "subdivision_2_iso_code": "string", - "timezone": "string", + "postal_code": "postal_code", + "region_code": "region_code", + "subdivision_2_iso_code": "subdivision_2_iso_code", + "timezone": "timezone", }, "skip_challenge": True, "threat_score": 0, @@ -126,21 +126,21 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare body={ "base64": "c29tZV9yZXF1ZXN0X2JvZHk=", "json": {}, - "plain_text": "string", + "plain_text": "plain_text", }, context={ "bot_score": 0, "geoloc": { "city": "London", - "continent": "string", + "continent": "continent", "is_eu_country": True, - "iso_code": "string", + "iso_code": "iso_code", "latitude": 0, "longitude": 0, - "postal_code": "string", - "region_code": "string", - "subdivision_2_iso_code": "string", - "timezone": "string", + "postal_code": "postal_code", + "region_code": "region_code", + "subdivision_2_iso_code": "subdivision_2_iso_code", + "timezone": "timezone", }, "skip_challenge": True, "threat_score": 0, diff --git a/tests/api_resources/rules/lists/test_bulk_operations.py b/tests/api_resources/rules/lists/test_bulk_operations.py index fa3248c9b0f..cea227ed259 100644 --- a/tests/api_resources/rules/lists/test_bulk_operations.py +++ b/tests/api_resources/rules/lists/test_bulk_operations.py @@ -20,7 +20,7 @@ class TestBulkOperations: @parametrize def test_method_get(self, client: Cloudflare) -> None: bulk_operation = client.rules.lists.bulk_operations.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.bulk_operations.with_streaming_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): client.rules.lists.bulk_operations.with_raw_response.get( - "", + operation_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncBulkOperations: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bulk_operation = await async_client.rules.lists.bulk_operations.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BulkOperationGetResponse], bulk_operation, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.bulk_operations.with_streaming_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.rules.lists.bulk_operations.with_raw_response.get( - "4da8780eeb215e6cb7f48dd981c4ea02", + operation_id="4da8780eeb215e6cb7f48dd981c4ea02", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `operation_id` but received ''"): await async_client.rules.lists.bulk_operations.with_raw_response.get( - "", + operation_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/rules/lists/test_items.py b/tests/api_resources/rules/lists/test_items.py index 6a2e0fab264..591f68417ff 100644 --- a/tests/api_resources/rules/lists/test_items.py +++ b/tests/api_resources/rules/lists/test_items.py @@ -26,7 +26,7 @@ class TestItems: @parametrize def test_method_create(self, client: Cloudflare) -> None: item = client.rules.lists.items.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -64,14 +64,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.create( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -79,7 +79,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: item = client.rules.lists.items.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -88,7 +88,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -101,7 +101,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -117,14 +117,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -132,7 +132,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: item = client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncCursorPagination[object], item, path=["response"]) @@ -140,7 +140,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: item = client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="zzz", per_page=1, @@ -151,7 +151,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -163,7 +163,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -178,20 +178,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.list( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: item = client.rules.lists.items.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) @@ -199,7 +199,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,20 +226,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: item = client.rules.lists.items.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -248,7 +248,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -261,7 +261,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.items.with_streaming_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) as response: @@ -277,21 +277,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): client.rules.lists.items.with_raw_response.get( - "", + item_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -303,7 +303,7 @@ class TestAsyncItems: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -312,7 +312,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -325,7 +325,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -341,14 +341,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.items.with_raw_response.create( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.create( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -356,7 +356,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -365,7 +365,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -378,7 +378,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) as response: @@ -394,14 +394,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.items.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", body=[{}, {}, {}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=[{}, {}, {}], ) @@ -409,7 +409,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncCursorPagination[object], item, path=["response"]) @@ -417,7 +417,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", cursor="zzz", per_page=1, @@ -428,7 +428,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -440,7 +440,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -455,20 +455,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.items.with_raw_response.list( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.list( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ItemDeleteResponse], item, path=["response"]) @@ -476,7 +476,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -488,7 +488,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -503,20 +503,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.items.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: item = await async_client.rules.lists.items.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -525,7 +525,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) @@ -538,7 +538,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.items.with_streaming_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) as response: @@ -554,21 +554,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.items.with_raw_response.get( - "34b12448945f11eaa1b71c4d701ab86e", + item_id="34b12448945f11eaa1b71c4d701ab86e", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `item_id` but received ''"): await async_client.rules.lists.items.with_raw_response.get( - "", + item_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", ) diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index b42d1525efc..c14548725c1 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -83,7 +83,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: list_ = client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: list_ = client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) @@ -102,7 +102,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -115,7 +115,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -131,13 +131,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -182,7 +182,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: list_ = client.rules.lists.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -190,7 +190,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -202,7 +202,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -217,13 +217,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -231,7 +231,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: list_ = client.rules.lists.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -240,7 +240,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -253,7 +253,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rules.lists.with_streaming_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -269,13 +269,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.rules.lists.with_raw_response.get( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -348,7 +348,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -357,7 +357,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is a note", ) @@ -367,7 +367,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -380,7 +380,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -396,13 +396,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.with_raw_response.update( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.update( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -447,7 +447,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -455,7 +455,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -467,7 +467,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -482,13 +482,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.with_raw_response.delete( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.delete( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -496,7 +496,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.rules.lists.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ListsList], list_, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -518,7 +518,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rules.lists.with_streaming_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -534,12 +534,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rules.lists.with_raw_response.get( - "2c0fc9fa937b11eaa1b71c4d701ab86e", + list_id="2c0fc9fa937b11eaa1b71c4d701ab86e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.rules.lists.with_raw_response.get( - "", + list_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index f763170399e..2e285e86c92 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -22,8 +22,8 @@ class TestVersions: @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -31,8 +31,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -40,8 +40,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.phases.versions.with_streaming_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,23 +69,23 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -93,9 +93,9 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -103,9 +103,9 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -117,9 +117,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -134,23 +134,23 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.phases.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) @@ -161,8 +161,8 @@ class TestAsyncVersions: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -170,8 +170,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -179,8 +179,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -192,8 +192,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.versions.with_streaming_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -208,23 +208,23 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.list( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -232,9 +232,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.phases.versions.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -242,9 +242,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -256,9 +256,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -273,21 +273,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_phase="http_request_firewall_custom", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 8abeef8e3df..c795b8c6f79 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -21,9 +21,9 @@ class TestPhases: @parametrize def test_method_update(self, client: Cloudflare) -> None: phase = client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) @@ -31,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[ { "action": "block", @@ -82,7 +82,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", name="My ruleset", ) @@ -92,9 +92,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -106,9 +106,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -123,24 +123,24 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -148,8 +148,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -157,8 +157,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -170,8 +170,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -186,14 +186,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) @@ -204,9 +204,9 @@ class TestAsyncPhases: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) @@ -214,7 +214,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[ { "action": "block", @@ -265,7 +265,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", name="My ruleset", ) @@ -275,9 +275,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -289,9 +289,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.with_streaming_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -306,24 +306,24 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.with_raw_response.update( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -331,8 +331,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -340,8 +340,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) assert response.is_closed is True @@ -353,8 +353,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.phases.with_streaming_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -369,12 +369,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", + ruleset_phase="http_request_firewall_custom", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.phases.with_raw_response.get( - "http_request_firewall_custom", - account_id="string", + ruleset_phase="http_request_firewall_custom", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index 090bf6fd02c..381720e4919 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -25,8 +25,8 @@ class TestRules: @parametrize def test_method_create_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -34,8 +34,8 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -57,8 +57,8 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -70,8 +70,8 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,28 +86,28 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: def test_path_params_create_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -115,8 +115,8 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -132,8 +132,8 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -145,8 +145,8 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,28 +161,28 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -190,8 +190,8 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -207,8 +207,8 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -220,8 +220,8 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -236,28 +236,28 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: def test_path_params_create_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -265,8 +265,8 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -307,8 +307,8 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -320,8 +320,8 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -336,28 +336,28 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: def test_path_params_create_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -365,8 +365,8 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -382,8 +382,8 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -395,8 +395,8 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -411,28 +411,28 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -440,8 +440,8 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -457,8 +457,8 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -470,8 +470,8 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -486,28 +486,28 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -515,8 +515,8 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -532,8 +532,8 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -545,8 +545,8 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -561,28 +561,28 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -590,8 +590,8 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -617,8 +617,8 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -630,8 +630,8 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -646,28 +646,28 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -675,8 +675,8 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -703,8 +703,8 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -716,8 +716,8 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -732,28 +732,28 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: def test_path_params_create_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -761,8 +761,8 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -785,8 +785,8 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -798,8 +798,8 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -814,28 +814,28 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None def test_path_params_create_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -843,8 +843,8 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -860,8 +860,8 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -873,8 +873,8 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -889,28 +889,28 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None def test_path_params_create_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -918,8 +918,8 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -939,8 +939,8 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -952,8 +952,8 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -968,28 +968,28 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None def test_path_params_create_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -997,8 +997,8 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -1036,8 +1036,8 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1049,8 +1049,8 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1065,28 +1065,28 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None def test_path_params_create_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1094,8 +1094,8 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -1117,8 +1117,8 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1130,8 +1130,8 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1146,28 +1146,28 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None def test_path_params_create_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1175,8 +1175,8 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -1271,8 +1271,8 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1284,8 +1284,8 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1300,28 +1300,28 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None def test_path_params_create_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1329,8 +1329,8 @@ def test_method_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -1350,8 +1350,8 @@ def test_method_create_with_all_params_overload_16(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1363,8 +1363,8 @@ def test_raw_response_create_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1379,28 +1379,28 @@ def test_streaming_response_create_overload_16(self, client: Cloudflare) -> None def test_path_params_create_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1408,8 +1408,8 @@ def test_method_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -1425,8 +1425,8 @@ def test_method_create_with_all_params_overload_17(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1438,8 +1438,8 @@ def test_raw_response_create_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1454,28 +1454,28 @@ def test_streaming_response_create_overload_17(self, client: Cloudflare) -> None def test_path_params_create_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1483,8 +1483,8 @@ def test_method_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -1500,8 +1500,8 @@ def test_method_create_with_all_params_overload_18(self, client: Cloudflare) -> @parametrize def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -1513,8 +1513,8 @@ def test_raw_response_create_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1529,29 +1529,29 @@ def test_streaming_response_create_overload_18(self, client: Cloudflare) -> None def test_path_params_create_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -1559,9 +1559,9 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: rule = client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -1569,9 +1569,9 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1583,9 +1583,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1600,39 +1600,39 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1640,9 +1640,9 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -1664,9 +1664,9 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1678,9 +1678,9 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1695,39 +1695,39 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1735,9 +1735,9 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -1753,9 +1753,9 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1767,9 +1767,9 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1784,39 +1784,39 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1824,9 +1824,9 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -1842,9 +1842,9 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1856,9 +1856,9 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1873,39 +1873,39 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1913,9 +1913,9 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -1956,9 +1956,9 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1970,9 +1970,9 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1987,39 +1987,39 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2027,9 +2027,9 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -2045,9 +2045,9 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2059,9 +2059,9 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2076,39 +2076,39 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2116,9 +2116,9 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -2134,9 +2134,9 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2148,9 +2148,9 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2165,39 +2165,39 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2205,9 +2205,9 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -2223,9 +2223,9 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2237,9 +2237,9 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2254,39 +2254,39 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2294,9 +2294,9 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -2322,9 +2322,9 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2336,9 +2336,9 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2353,39 +2353,39 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2393,9 +2393,9 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -2422,9 +2422,9 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2436,9 +2436,9 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2453,39 +2453,39 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2493,9 +2493,9 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -2518,9 +2518,9 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2532,9 +2532,9 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2549,39 +2549,39 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2589,9 +2589,9 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -2607,9 +2607,9 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2621,9 +2621,9 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2638,39 +2638,39 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2678,9 +2678,9 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -2700,9 +2700,9 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2714,9 +2714,9 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2731,39 +2731,39 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2771,9 +2771,9 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -2811,9 +2811,9 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2825,9 +2825,9 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2842,39 +2842,39 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2882,9 +2882,9 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -2906,9 +2906,9 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2920,9 +2920,9 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2937,39 +2937,39 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2977,9 +2977,9 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -3074,9 +3074,9 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3088,9 +3088,9 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3105,39 +3105,39 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -3145,9 +3145,9 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -3167,9 +3167,9 @@ def test_method_edit_with_all_params_overload_16(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3181,9 +3181,9 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3198,39 +3198,39 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -3238,9 +3238,9 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -3256,9 +3256,9 @@ def test_method_edit_with_all_params_overload_17(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3270,9 +3270,9 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3287,39 +3287,39 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -3327,9 +3327,9 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> None: rule = client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -3345,9 +3345,9 @@ def test_method_edit_with_all_params_overload_18(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3359,9 +3359,9 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3376,30 +3376,30 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @@ -3410,8 +3410,8 @@ class TestAsyncRules: @parametrize async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3419,8 +3419,8 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -3442,8 +3442,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3455,8 +3455,8 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3471,28 +3471,28 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3500,8 +3500,8 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -3517,8 +3517,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3530,8 +3530,8 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3546,28 +3546,28 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3575,8 +3575,8 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -3592,8 +3592,8 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3605,8 +3605,8 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3621,28 +3621,28 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3650,8 +3650,8 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -3692,8 +3692,8 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3705,8 +3705,8 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3721,28 +3721,28 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3750,8 +3750,8 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -3767,8 +3767,8 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3780,8 +3780,8 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3796,28 +3796,28 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3825,8 +3825,8 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -3842,8 +3842,8 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3855,8 +3855,8 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3871,28 +3871,28 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3900,8 +3900,8 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -3917,8 +3917,8 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -3930,8 +3930,8 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3946,28 +3946,28 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3975,8 +3975,8 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -4002,8 +4002,8 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4015,8 +4015,8 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4031,28 +4031,28 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4060,8 +4060,8 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -4088,8 +4088,8 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4101,8 +4101,8 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4117,28 +4117,28 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4146,8 +4146,8 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -4170,8 +4170,8 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4183,8 +4183,8 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4199,28 +4199,28 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl async def test_path_params_create_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4228,8 +4228,8 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -4245,8 +4245,8 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4258,8 +4258,8 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4274,28 +4274,28 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl async def test_path_params_create_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4303,8 +4303,8 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -4324,8 +4324,8 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4337,8 +4337,8 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4353,28 +4353,28 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl async def test_path_params_create_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4382,8 +4382,8 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -4421,8 +4421,8 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4434,8 +4434,8 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4450,28 +4450,28 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl async def test_path_params_create_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4479,8 +4479,8 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -4502,8 +4502,8 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4515,8 +4515,8 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4531,28 +4531,28 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl async def test_path_params_create_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4560,8 +4560,8 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -4656,8 +4656,8 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy @parametrize async def test_raw_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4669,8 +4669,8 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4685,28 +4685,28 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl async def test_path_params_create_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4714,8 +4714,8 @@ async def test_method_create_overload_16(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -4735,8 +4735,8 @@ async def test_method_create_with_all_params_overload_16(self, async_client: Asy @parametrize async def test_raw_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4748,8 +4748,8 @@ async def test_raw_response_create_overload_16(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4764,28 +4764,28 @@ async def test_streaming_response_create_overload_16(self, async_client: AsyncCl async def test_path_params_create_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4793,8 +4793,8 @@ async def test_method_create_overload_17(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -4810,8 +4810,8 @@ async def test_method_create_with_all_params_overload_17(self, async_client: Asy @parametrize async def test_raw_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4823,8 +4823,8 @@ async def test_raw_response_create_overload_17(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4839,28 +4839,28 @@ async def test_streaming_response_create_overload_17(self, async_client: AsyncCl async def test_path_params_create_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4868,8 +4868,8 @@ async def test_method_create_overload_18(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -4885,8 +4885,8 @@ async def test_method_create_with_all_params_overload_18(self, async_client: Asy @parametrize async def test_raw_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -4898,8 +4898,8 @@ async def test_raw_response_create_overload_18(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_create_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4914,29 +4914,29 @@ async def test_streaming_response_create_overload_18(self, async_client: AsyncCl async def test_path_params_create_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.create( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -4944,9 +4944,9 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -4954,9 +4954,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4968,9 +4968,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4985,39 +4985,39 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.delete( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5025,9 +5025,9 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -5049,9 +5049,9 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5063,9 +5063,9 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5080,39 +5080,39 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5120,9 +5120,9 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -5138,9 +5138,9 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5152,9 +5152,9 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5169,39 +5169,39 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5209,9 +5209,9 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -5227,9 +5227,9 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5241,9 +5241,9 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5258,39 +5258,39 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5298,9 +5298,9 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -5341,9 +5341,9 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5355,9 +5355,9 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5372,39 +5372,39 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5412,9 +5412,9 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -5430,9 +5430,9 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5444,9 +5444,9 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5461,39 +5461,39 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5501,9 +5501,9 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -5519,9 +5519,9 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5533,9 +5533,9 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5550,39 +5550,39 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5590,9 +5590,9 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -5608,9 +5608,9 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5622,9 +5622,9 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5639,39 +5639,39 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5679,9 +5679,9 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -5707,9 +5707,9 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5721,9 +5721,9 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5738,39 +5738,39 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5778,9 +5778,9 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -5807,9 +5807,9 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5821,9 +5821,9 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5838,39 +5838,39 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5878,9 +5878,9 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -5903,9 +5903,9 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5917,9 +5917,9 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5934,39 +5934,39 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5974,9 +5974,9 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -5992,9 +5992,9 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6006,9 +6006,9 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6023,39 +6023,39 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6063,9 +6063,9 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -6085,9 +6085,9 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6099,9 +6099,9 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6116,39 +6116,39 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6156,9 +6156,9 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -6196,9 +6196,9 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6210,9 +6210,9 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6227,39 +6227,39 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6267,9 +6267,9 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -6291,9 +6291,9 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6305,9 +6305,9 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6322,39 +6322,39 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6362,9 +6362,9 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_15(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -6459,9 +6459,9 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6473,9 +6473,9 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6490,39 +6490,39 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6530,9 +6530,9 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="log_custom_field", action_parameters={ @@ -6552,9 +6552,9 @@ async def test_method_edit_with_all_params_overload_16(self, async_client: Async @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6566,9 +6566,9 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6583,39 +6583,39 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6623,9 +6623,9 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_17(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="ddos_dynamic", action_parameters={}, @@ -6641,9 +6641,9 @@ async def test_method_edit_with_all_params_overload_17(self, async_client: Async @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6655,9 +6655,9 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6672,39 +6672,39 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6712,9 +6712,9 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_18(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rulesets.rules.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", id="3a03d665bac047339bb530ecb439a90d", action="force_connection_close", action_parameters={}, @@ -6730,9 +6730,9 @@ async def test_method_edit_with_all_params_overload_18(self, async_client: Async @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -6744,9 +6744,9 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.rules.with_streaming_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6761,28 +6761,28 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "", + rule_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.rules.with_raw_response.edit( - "3a03d665bac047339bb530ecb439a90d", + rule_id="3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 3106292143c..67582d09bf4 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -22,8 +22,8 @@ class TestVersions: @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -31,8 +31,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @@ -40,8 +40,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,29 +69,29 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.list( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: version = client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -99,9 +99,9 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -109,9 +109,9 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -123,9 +123,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,39 +140,39 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.versions.with_raw_response.delete( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -180,9 +180,9 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -190,9 +190,9 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -204,9 +204,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -221,30 +221,30 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @@ -255,8 +255,8 @@ class TestAsyncVersions: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -264,8 +264,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @@ -273,8 +273,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -286,8 +286,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -302,29 +302,29 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.list( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -332,9 +332,9 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert version is None @@ -342,9 +342,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -356,9 +356,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,39 +373,39 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.delete( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -413,9 +413,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -423,9 +423,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -437,9 +437,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.with_streaming_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -454,28 +454,28 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "", + ruleset_version="", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.versions.with_raw_response.get( - "1", + ruleset_version="1", ruleset_id="2f2feab2026849078ba485f918791bdc", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/rulesets/versions/test_by_tag.py b/tests/api_resources/rulesets/versions/test_by_tag.py index 6122739a88f..01267ce0ff9 100644 --- a/tests/api_resources/rulesets/versions/test_by_tag.py +++ b/tests/api_resources/rulesets/versions/test_by_tag.py @@ -20,7 +20,7 @@ class TestByTag: @parametrize def test_method_get(self, client: Cloudflare) -> None: by_tag = client.rulesets.versions.by_tag.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -30,7 +30,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -44,7 +44,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.versions.by_tag.with_streaming_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -61,7 +61,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -69,7 +69,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="", ruleset_version="1", @@ -77,7 +77,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="", @@ -85,7 +85,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_tag` but received ''"): client.rulesets.versions.by_tag.with_raw_response.get( - "", + rule_tag="", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -98,7 +98,7 @@ class TestAsyncByTag: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: by_tag = await async_client.rulesets.versions.by_tag.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -108,7 +108,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -122,7 +122,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.versions.by_tag.with_streaming_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -139,7 +139,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", @@ -147,7 +147,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="", ruleset_version="1", @@ -155,7 +155,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "directory-traversal", + rule_tag="directory-traversal", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="", @@ -163,7 +163,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_tag` but received ''"): await async_client.rulesets.versions.by_tag.with_raw_response.get( - "", + rule_tag="", account_id="abf9b32d38c5f572afde3336ec0ce302", ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py index 41a20cc0ee4..6cdb5f5db36 100644 --- a/tests/api_resources/rum/test_rules.py +++ b/tests/api_resources/rum/test_rules.py @@ -20,7 +20,7 @@ class TestRules: @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", host="example.com", inclusive=True, @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,20 +67,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.create( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -89,7 +89,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", host="example.com", @@ -102,7 +102,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -115,7 +115,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -131,21 +131,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rum.rules.with_raw_response.update( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -153,7 +153,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.rum.rules.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) @@ -161,7 +161,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -173,7 +173,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -188,20 +188,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.list( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.rum.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -210,7 +210,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -223,7 +223,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rum.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -239,21 +239,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.rum.rules.with_raw_response.delete( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -265,7 +265,7 @@ class TestAsyncRules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RUMRule], rule, path=["response"]) @@ -273,7 +273,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", host="example.com", inclusive=True, @@ -285,7 +285,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -297,7 +297,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -312,20 +312,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.create( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -334,7 +334,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", host="example.com", @@ -347,7 +347,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -360,7 +360,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -376,21 +376,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rum.rules.with_raw_response.update( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -398,7 +398,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -418,7 +418,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -433,20 +433,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.list( - "", + ruleset_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.rum.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -455,7 +455,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -468,7 +468,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -484,21 +484,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rum.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.rum.rules.with_raw_response.delete( - "", + rule_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) diff --git a/tests/api_resources/rum/test_site_info.py b/tests/api_resources/rum/test_site_info.py index 2e72e44a04e..dbd592cad22 100644 --- a/tests/api_resources/rum/test_site_info.py +++ b/tests/api_resources/rum/test_site_info.py @@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: site_info = client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -80,7 +80,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: site_info = client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_install=True, host="example.com", @@ -91,7 +91,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -103,7 +103,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -118,13 +118,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.rum.site_info.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -179,7 +179,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: site_info = client.rum.site_info.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) @@ -187,7 +187,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -199,7 +199,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -214,20 +214,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.rum.site_info.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: site_info = client.rum.site_info.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -235,7 +235,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -247,7 +247,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rum.site_info.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -262,13 +262,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): client.rum.site_info.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -327,7 +327,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -335,7 +335,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", auto_install=True, host="example.com", @@ -346,7 +346,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -358,7 +358,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -373,13 +373,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.site_info.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.rum.site_info.with_raw_response.update( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -434,7 +434,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SiteInfoDeleteResponse], site_info, path=["response"]) @@ -442,7 +442,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,20 +469,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.site_info.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.rum.site_info.with_raw_response.delete( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: site_info = await async_client.rum.site_info.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Site], site_info, path=["response"]) @@ -490,7 +490,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -502,7 +502,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rum.site_info.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -517,12 +517,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rum.site_info.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + site_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"): await async_client.rum.site_info.with_raw_response.get( - "", + site_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/secondary_dns/test_acls.py b/tests/api_resources/secondary_dns/test_acls.py index 6723d4ab22d..421109936c4 100644 --- a/tests/api_resources/secondary_dns/test_acls.py +++ b/tests/api_resources/secondary_dns/test_acls.py @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -77,7 +77,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -91,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -108,7 +108,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ip_range="192.0.2.53/28", name="my-acl-1", @@ -116,7 +116,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.update( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -163,7 +163,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) @@ -171,7 +171,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -183,7 +183,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -198,20 +198,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.delete( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACL], acl, path=["response"]) @@ -219,7 +219,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -231,7 +231,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.acls.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -246,13 +246,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): client.secondary_dns.acls.with_raw_response.get( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -309,7 +309,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -319,7 +319,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -333,7 +333,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -350,7 +350,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ip_range="192.0.2.53/28", name="my-acl-1", @@ -358,7 +358,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.update( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ip_range="192.0.2.53/28", name="my-acl-1", @@ -405,7 +405,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACLDeleteResponse], acl, path=["response"]) @@ -413,7 +413,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -425,7 +425,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -440,20 +440,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.delete( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[ACL], acl, path=["response"]) @@ -461,7 +461,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -473,7 +473,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.acls.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -488,12 +488,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + acl_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `acl_id` but received ''"): await async_client.secondary_dns.acls.with_raw_response.get( - "", + acl_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/secondary_dns/test_peers.py b/tests/api_resources/secondary_dns/test_peers.py index 9129014f7bd..82430f212f7 100644 --- a/tests/api_resources/secondary_dns/test_peers.py +++ b/tests/api_resources/secondary_dns/test_peers.py @@ -67,7 +67,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ip="192.0.2.53", @@ -89,7 +89,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -102,7 +102,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) as response: @@ -118,14 +118,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", name="my-peer-1", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.update( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -171,7 +171,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) @@ -179,7 +179,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -191,7 +191,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -206,20 +206,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.delete( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[Peer], peer, path=["response"]) @@ -227,7 +227,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -239,7 +239,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.peers.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -254,13 +254,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): client.secondary_dns.peers.with_raw_response.get( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -317,7 +317,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -326,7 +326,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ip="192.0.2.53", @@ -339,7 +339,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -352,7 +352,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) as response: @@ -368,14 +368,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.update( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", name="my-peer-1", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.update( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", name="my-peer-1", ) @@ -421,7 +421,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[PeerDeleteResponse], peer, path=["response"]) @@ -429,7 +429,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -441,7 +441,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -456,20 +456,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.delete( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.delete( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[Peer], peer, path=["response"]) @@ -477,7 +477,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -489,7 +489,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.peers.with_streaming_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -504,12 +504,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.get( - "23ff594956f20c2a721606e94745a8aa", + peer_id="23ff594956f20c2a721606e94745a8aa", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `peer_id` but received ''"): await async_client.secondary_dns.peers.with_raw_response.get( - "", + peer_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/secondary_dns/test_tsigs.py b/tests/api_resources/secondary_dns/test_tsigs.py index cfc48b5b25e..c75273b7eef 100644 --- a/tests/api_resources/secondary_dns/test_tsigs.py +++ b/tests/api_resources/secondary_dns/test_tsigs.py @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -97,7 +97,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -115,7 +115,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -124,7 +124,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.update( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -172,7 +172,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) @@ -180,7 +180,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -192,7 +192,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -207,20 +207,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.delete( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) @@ -228,7 +228,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -240,7 +240,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.secondary_dns.tsigs.with_streaming_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -255,13 +255,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): client.secondary_dns.tsigs.with_raw_response.get( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -322,7 +322,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -333,7 +333,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -348,7 +348,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -366,7 +366,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.update( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -375,7 +375,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.update( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", algo="hmac-sha512.", name="tsig.customer.cf.", @@ -423,7 +423,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIGDeleteResponse], tsig, path=["response"]) @@ -431,7 +431,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -443,7 +443,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -458,20 +458,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.delete( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.delete( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[TSIG], tsig, path=["response"]) @@ -479,7 +479,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -491,7 +491,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.secondary_dns.tsigs.with_streaming_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -506,12 +506,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.get( - "69cd1e104af3e6ed3cb344f263fd0d5a", + tsig_id="69cd1e104af3e6ed3cb344f263fd0d5a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tsig_id` but received ''"): await async_client.secondary_dns.tsigs.with_raw_response.get( - "", + tsig_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/snippets/test_content.py b/tests/api_resources/snippets/test_content.py index 752e1d2e2a5..371c111994b 100644 --- a/tests/api_resources/snippets/test_content.py +++ b/tests/api_resources/snippets/test_content.py @@ -31,7 +31,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: return_value=httpx.Response(200, json={"foo": "bar"}) ) content = client.snippets.content.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -48,7 +48,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ) content = client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -65,7 +65,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.snippets.content.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -83,13 +83,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.content.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -105,7 +105,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR return_value=httpx.Response(200, json={"foo": "bar"}) ) content = await async_client.snippets.content.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -122,7 +122,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ) content = await async_client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.snippets.content.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -157,12 +157,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.content.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.content.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py index fa152873a47..de18b708629 100644 --- a/tests/api_resources/spectrum/analytics/aggregates/test_currents.py +++ b/tests/api_resources/spectrum/analytics/aggregates/test_currents.py @@ -20,14 +20,14 @@ class TestCurrents: @parametrize def test_method_get(self, client: Cloudflare) -> None: current = client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CurrentGetResponse, current, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: current = client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", app_id_param="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", app_id="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", colo_name="PDX", @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -48,7 +48,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.aggregates.currents.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,7 +62,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "", + zone="", ) @@ -72,14 +72,14 @@ class TestAsyncCurrents: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: current = await async_client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CurrentGetResponse, current, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: current = await async_client.spectrum.analytics.aggregates.currents.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", app_id_param="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", app_id="ea95132c15732412d22c1476fa83f27a,d122c5f4bb71e25cc9e86ab43b142e2f", colo_name="PDX", @@ -89,7 +89,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -100,7 +100,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.analytics.aggregates.currents.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,5 +114,5 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.analytics.aggregates.currents.with_raw_response.get( - "", + zone="", ) diff --git a/tests/api_resources/spectrum/analytics/events/test_bytimes.py b/tests/api_resources/spectrum/analytics/events/test_bytimes.py index 57a939363a2..70f1ba3f65d 100644 --- a/tests/api_resources/spectrum/analytics/events/test_bytimes.py +++ b/tests/api_resources/spectrum/analytics/events/test_bytimes.py @@ -21,14 +21,14 @@ class TestBytimes: @parametrize def test_method_get(self, client: Cloudflare) -> None: bytime = client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: bytime = client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -42,7 +42,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.events.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -53,7 +53,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.events.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +67,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.analytics.events.bytimes.with_raw_response.get( - "", + zone="", ) @@ -77,14 +77,14 @@ class TestAsyncBytimes: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[BytimeGetResponse], bytime, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.spectrum.analytics.events.bytimes.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -98,7 +98,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.events.bytimes.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -109,7 +109,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.analytics.events.bytimes.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -123,5 +123,5 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.analytics.events.bytimes.with_raw_response.get( - "", + zone="", ) diff --git a/tests/api_resources/spectrum/analytics/events/test_summaries.py b/tests/api_resources/spectrum/analytics/events/test_summaries.py index abccd1640c3..d1e1bedcdf7 100644 --- a/tests/api_resources/spectrum/analytics/events/test_summaries.py +++ b/tests/api_resources/spectrum/analytics/events/test_summaries.py @@ -21,14 +21,14 @@ class TestSummaries: @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -41,7 +41,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.analytics.events.summaries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -52,7 +52,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.analytics.events.summaries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,7 +66,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.analytics.events.summaries.with_raw_response.get( - "", + zone="", ) @@ -76,14 +76,14 @@ class TestAsyncSummaries: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SummaryGetResponse], summary, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.spectrum.analytics.events.summaries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dimensions=["event", "appID"], filters="event==disconnect%20AND%20coloName!=SFO", metrics=["count", "bytesIngress"], @@ -96,7 +96,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.analytics.events.summaries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -107,7 +107,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.analytics.events.summaries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -121,5 +121,5 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.analytics.events.summaries.with_raw_response.get( - "", + zone="", ) diff --git a/tests/api_resources/spectrum/test_apps.py b/tests/api_resources/spectrum/test_apps.py index cdd400dea70..58722950191 100644 --- a/tests/api_resources/spectrum/test_apps.py +++ b/tests/api_resources/spectrum/test_apps.py @@ -26,7 +26,7 @@ class TestApps: @parametrize def test_method_create(self, client: Cloudflare) -> None: app = client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", "type": "CNAME", @@ -64,7 +64,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -79,7 +79,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -97,7 +97,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.create( - "", + zone="", dns={}, origin_dns={}, origin_port=22, @@ -107,7 +107,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: app = client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -119,7 +119,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", @@ -147,7 +147,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -163,7 +163,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -182,7 +182,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", dns={}, origin_dns={}, @@ -192,7 +192,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.update( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -203,14 +203,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: app = client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[object], app, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: app = client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order="protocol", page=1, @@ -221,7 +221,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -232,7 +232,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -246,13 +246,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.list( - "", + zone="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: app = client.spectrum.apps.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -260,7 +260,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -272,7 +272,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -287,20 +287,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.delete( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: app = client.spectrum.apps.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AppGetResponse, app, path=["response"]) @@ -308,7 +308,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -320,7 +320,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.spectrum.apps.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -335,13 +335,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.spectrum.apps.with_raw_response.get( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -352,7 +352,7 @@ class TestAsyncApps: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -363,7 +363,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", "type": "CNAME", @@ -390,7 +390,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -405,7 +405,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, origin_port=22, @@ -423,7 +423,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.create( - "", + zone="", dns={}, origin_dns={}, origin_port=22, @@ -433,7 +433,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -445,7 +445,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={ "name": "ssh.example.com", @@ -473,7 +473,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -489,7 +489,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -508,7 +508,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.update( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", dns={}, origin_dns={}, @@ -518,7 +518,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.update( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", dns={}, origin_dns={}, @@ -529,14 +529,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[object], app, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order="protocol", page=1, @@ -547,7 +547,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -558,7 +558,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -572,13 +572,13 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.list( - "", + zone="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AppDeleteResponse], app, path=["response"]) @@ -586,7 +586,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -598,7 +598,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -613,20 +613,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.delete( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: app = await async_client.spectrum.apps.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AppGetResponse, app, path=["response"]) @@ -634,7 +634,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -646,7 +646,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.spectrum.apps.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -661,12 +661,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone` but received ''"): await async_client.spectrum.apps.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + app_id="ea95132c15732412d22c1476fa83f27a", zone="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.spectrum.apps.with_raw_response.get( - "", + app_id="", zone="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/speed/pages/test_tests.py b/tests/api_resources/speed/pages/test_tests.py index 5d768ba427c..9bc7170f416 100644 --- a/tests/api_resources/speed/pages/test_tests.py +++ b/tests/api_resources/speed/pages/test_tests.py @@ -24,7 +24,7 @@ class TestTests: @parametrize def test_method_create(self, client: Cloudflare) -> None: test = client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Test], test, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: test = client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,20 +68,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: test = client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(TestListResponse, test, path=["response"]) @@ -89,7 +89,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: test = client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=20, @@ -100,7 +100,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -127,20 +127,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.list( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: test = client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) @@ -148,7 +148,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: test = client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -157,7 +157,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -169,7 +169,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -184,20 +184,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: test = client.speed.pages.tests.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -206,7 +206,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -219,7 +219,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.speed.pages.tests.with_streaming_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) as response: @@ -235,21 +235,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="", url="example.com", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.speed.pages.tests.with_raw_response.get( - "", + test_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -261,7 +261,7 @@ class TestAsyncTests: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Test], test, path=["response"]) @@ -269,7 +269,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -278,7 +278,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -290,7 +290,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -305,20 +305,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(TestListResponse, test, path=["response"]) @@ -326,7 +326,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=20, @@ -337,7 +337,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -349,7 +349,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.list( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -364,20 +364,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.list( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.list( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TestDeleteResponse], test, path=["response"]) @@ -385,7 +385,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -394,7 +394,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -406,7 +406,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -421,20 +421,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: test = await async_client.speed.pages.tests.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -443,7 +443,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) @@ -456,7 +456,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.tests.with_streaming_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) as response: @@ -472,21 +472,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="", url="example.com", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.tests.with_raw_response.get( - "string", + test_id="test_id", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.speed.pages.tests.with_raw_response.get( - "", + test_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", url="example.com", ) diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py index 0d259ddcb4a..611a73ec015 100644 --- a/tests/api_resources/speed/test_pages.py +++ b/tests/api_resources/speed/test_pages.py @@ -61,13 +61,13 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_trend(self, client: Cloudflare) -> None: page = client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -75,13 +75,13 @@ def test_method_trend(self, client: Cloudflare) -> None: @parametrize def test_method_trend_with_all_params(self, client: Cloudflare) -> None: page = client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", end=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -90,13 +90,13 @@ def test_method_trend_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_trend(self, client: Cloudflare) -> None: response = client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert response.is_closed is True @@ -108,13 +108,13 @@ def test_raw_response_trend(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_trend(self, client: Cloudflare) -> None: with client.speed.pages.with_streaming_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,24 +129,24 @@ def test_streaming_response_trend(self, client: Cloudflare) -> None: def test_path_params_trend(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.pages.with_raw_response.trend( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) @@ -195,13 +195,13 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_trend(self, async_client: AsyncCloudflare) -> None: page = await async_client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -209,13 +209,13 @@ async def test_method_trend(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_trend_with_all_params(self, async_client: AsyncCloudflare) -> None: page = await async_client.speed.pages.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", end=parse_datetime("2014-01-01T05:20:00.12345Z"), ) assert_matches_type(Optional[Trend], page, path=["response"]) @@ -224,13 +224,13 @@ async def test_method_trend_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_trend(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) assert response.is_closed is True @@ -242,13 +242,13 @@ async def test_raw_response_trend(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_trend(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.pages.with_streaming_response.trend( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -263,22 +263,22 @@ async def test_streaming_response_trend(self, async_client: AsyncCloudflare) -> async def test_path_params_trend(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.pages.with_raw_response.trend( - "example.com", + url="example.com", zone_id="", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.pages.with_raw_response.trend( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", device_type="DESKTOP", metrics="performanceScore,ttfb,fcp,si,lcp,tti,tbt,cls", region="us-central1", start=parse_datetime("2014-01-01T05:20:00.12345Z"), - tz="string", + tz="tz", ) diff --git a/tests/api_resources/speed/test_schedule.py b/tests/api_resources/speed/test_schedule.py index 4a20e89f851..e3e05e0ed53 100644 --- a/tests/api_resources/speed/test_schedule.py +++ b/tests/api_resources/speed/test_schedule.py @@ -24,7 +24,7 @@ class TestSchedule: @parametrize def test_method_create(self, client: Cloudflare) -> None: schedule = client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,20 +68,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.schedule.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: schedule = client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) @@ -89,7 +89,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -98,7 +98,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -110,7 +110,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -125,20 +125,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.schedule.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: schedule = client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Schedule], schedule, path=["response"]) @@ -146,7 +146,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: schedule = client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -155,7 +155,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -167,7 +167,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.speed.schedule.with_streaming_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -182,13 +182,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): client.speed.schedule.with_raw_response.get( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -199,7 +199,7 @@ class TestAsyncSchedule: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleCreateResponse], schedule, path=["response"]) @@ -207,7 +207,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -216,7 +216,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -228,7 +228,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.schedule.with_streaming_response.create( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -243,20 +243,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.schedule.with_raw_response.create( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.schedule.with_raw_response.create( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleDeleteResponse], schedule, path=["response"]) @@ -264,7 +264,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -273,7 +273,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -285,7 +285,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.schedule.with_streaming_response.delete( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -300,20 +300,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.schedule.with_raw_response.delete( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.schedule.with_raw_response.delete( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Schedule], schedule, path=["response"]) @@ -321,7 +321,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.speed.schedule.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", region="us-central1", ) @@ -330,7 +330,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -342,7 +342,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.speed.schedule.with_streaming_response.get( - "example.com", + url="example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -357,12 +357,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.speed.schedule.with_raw_response.get( - "example.com", + url="example.com", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `url` but received ''"): await async_client.speed.schedule.with_raw_response.get( - "", + url="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py index 865b9acef62..6bef155e88b 100644 --- a/tests/api_resources/ssl/test_certificate_packs.py +++ b/tests/api_resources/ssl/test_certificate_packs.py @@ -71,7 +71,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) @@ -79,7 +79,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -91,7 +91,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -106,20 +106,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.delete( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -128,7 +128,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -141,7 +141,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -157,14 +157,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -172,7 +172,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) @@ -180,7 +180,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -192,7 +192,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ssl.certificate_packs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -207,13 +207,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.certificate_packs.with_raw_response.get( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackDeleteResponse], certificate_pack, path=["response"]) @@ -278,7 +278,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -290,7 +290,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -305,20 +305,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.delete( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -327,7 +327,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -340,7 +340,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -356,14 +356,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -371,7 +371,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CertificatePackGetResponse], certificate_pack, path=["response"]) @@ -379,7 +379,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -391,7 +391,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.certificate_packs.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -406,12 +406,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_pack_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.certificate_packs.with_raw_response.get( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/ssl/test_verification.py b/tests/api_resources/ssl/test_verification.py index 2f83b897384..4d6460a428d 100644 --- a/tests/api_resources/ssl/test_verification.py +++ b/tests/api_resources/ssl/test_verification.py @@ -23,7 +23,7 @@ class TestVerification: @parametrize def test_method_edit(self, client: Cloudflare) -> None: verification = client.ssl.verification.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -32,7 +32,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -45,7 +45,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.ssl.verification.with_streaming_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) as response: @@ -61,14 +61,14 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="", validation_method="txt", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): client.ssl.verification.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -126,7 +126,7 @@ class TestAsyncVerification: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: verification = await async_client.ssl.verification.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -135,7 +135,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) @@ -148,7 +148,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.ssl.verification.with_streaming_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) as response: @@ -164,14 +164,14 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.ssl.verification.with_raw_response.edit( - "a77f8bd7-3b47-46b4-a6f1-75cf98109948", + certificate_pack_id="a77f8bd7-3b47-46b4-a6f1-75cf98109948", zone_id="", validation_method="txt", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_pack_id` but received ''"): await async_client.ssl.verification.with_raw_response.edit( - "", + certificate_pack_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", validation_method="txt", ) diff --git a/tests/api_resources/stream/captions/language/test_vtt.py b/tests/api_resources/stream/captions/language/test_vtt.py index 64b2a97f352..c3e6421643b 100644 --- a/tests/api_resources/stream/captions/language/test_vtt.py +++ b/tests/api_resources/stream/captions/language/test_vtt.py @@ -19,7 +19,7 @@ class TestVtt: @parametrize def test_method_get(self, client: Cloudflare) -> None: vtt = client.stream.captions.language.vtt.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -41,7 +41,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.language.vtt.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -57,21 +57,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.vtt.with_raw_response.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -83,7 +83,7 @@ class TestAsyncVtt: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: vtt = await async_client.stream.captions.language.vtt.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -92,7 +92,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -105,7 +105,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.vtt.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -121,21 +121,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.language.vtt.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): await async_client.stream.captions.language.vtt.with_raw_response.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) diff --git a/tests/api_resources/stream/captions/test_language.py b/tests/api_resources/stream/captions/test_language.py index cdcc495bcd5..0fe61c3cb38 100644 --- a/tests/api_resources/stream/captions/test_language.py +++ b/tests/api_resources/stream/captions/test_language.py @@ -20,7 +20,7 @@ class TestLanguage: @parametrize def test_method_create(self, client: Cloudflare) -> None: language = client.stream.captions.language.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.with_raw_response.create( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: language = client.stream.captions.language.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -92,7 +92,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -125,7 +125,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -133,7 +133,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", file="@/Users/kyle/Desktop/tr.vtt", @@ -141,7 +141,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.with_raw_response.update( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -150,7 +150,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: language = client.stream.captions.language.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -159,7 +159,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -188,21 +188,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.with_raw_response.delete( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -210,7 +210,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: language = client.stream.captions.language.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -219,7 +219,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -232,7 +232,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.language.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -248,21 +248,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): client.stream.captions.language.with_raw_response.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -274,7 +274,7 @@ class TestAsyncLanguage: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -283,7 +283,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -296,7 +296,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -312,21 +312,21 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.language.with_raw_response.create( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): await async_client.stream.captions.language.with_raw_response.create( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -335,7 +335,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -346,7 +346,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -361,7 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -379,7 +379,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -387,7 +387,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.language.with_raw_response.update( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", file="@/Users/kyle/Desktop/tr.vtt", @@ -395,7 +395,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): await async_client.stream.captions.language.with_raw_response.update( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", file="@/Users/kyle/Desktop/tr.vtt", @@ -404,7 +404,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -413,7 +413,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -426,7 +426,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -442,21 +442,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.language.with_raw_response.delete( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): await async_client.stream.captions.language.with_raw_response.delete( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -464,7 +464,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: language = await async_client.stream.captions.language.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -473,7 +473,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -486,7 +486,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.language.with_streaming_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -502,21 +502,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.language.with_raw_response.get( - "tr", + language="tr", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `language` but received ''"): await async_client.stream.captions.language.with_raw_response.get( - "", + language="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py index b20c437529f..d1041731a3f 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -21,7 +21,7 @@ class TestOutputs: @parametrize def test_method_create(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -73,7 +73,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.create( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -100,7 +100,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -114,7 +114,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -131,7 +131,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -139,7 +139,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", enabled=True, @@ -147,7 +147,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.update( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -156,7 +156,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Output], output, path=["response"]) @@ -164,7 +164,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -176,7 +176,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -191,20 +191,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.list( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: output = client.stream.live_inputs.outputs.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -213,7 +213,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -226,7 +226,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.live_inputs.outputs.with_streaming_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) as response: @@ -242,21 +242,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): client.stream.live_inputs.outputs.with_raw_response.delete( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -268,7 +268,7 @@ class TestAsyncOutputs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -278,7 +278,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -289,7 +289,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -320,7 +320,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.create( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -328,7 +328,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.create( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", stream_key="uzya-f19y-g2g9-a2ee-51j2", url="rtmp://a.rtmp.youtube.com/live2", @@ -337,7 +337,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -347,7 +347,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -361,7 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -378,7 +378,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -386,7 +386,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.update( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", enabled=True, @@ -394,7 +394,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.update( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", enabled=True, @@ -403,7 +403,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Output], output, path=["response"]) @@ -411,7 +411,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -423,7 +423,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -438,20 +438,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.list( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.list( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: output = await async_client.stream.live_inputs.outputs.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) @@ -473,7 +473,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.outputs.with_streaming_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) as response: @@ -489,21 +489,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "baea4d9c515887b80289d5c33cf01145", + output_identifier="baea4d9c515887b80289d5c33cf01145", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `output_identifier` but received ''"): await async_client.stream.live_inputs.outputs.with_raw_response.delete( - "", + output_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", ) diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py index b1af748dc56..026c7c2486f 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -24,7 +24,7 @@ class TestAudioTracks: @parametrize def test_method_delete(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -33,7 +33,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -46,7 +46,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -62,21 +62,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): client.stream.audio_tracks.with_raw_response.delete( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -84,7 +84,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_copy(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -93,7 +93,7 @@ def test_method_copy(self, client: Cloudflare) -> None: @parametrize def test_method_copy_with_all_params(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", @@ -103,7 +103,7 @@ def test_method_copy_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_copy(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -116,7 +116,7 @@ def test_raw_response_copy(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_copy(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) as response: @@ -132,14 +132,14 @@ def test_streaming_response_copy(self, client: Cloudflare) -> None: def test_path_params_copy(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", label="director commentary", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.copy( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -147,7 +147,7 @@ def test_path_params_copy(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -156,7 +156,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", default=True, @@ -167,7 +167,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -180,7 +180,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -196,21 +196,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): client.stream.audio_tracks.with_raw_response.edit( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -218,7 +218,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: audio_track = client.stream.audio_tracks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) @@ -226,7 +226,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.audio_tracks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -253,13 +253,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.audio_tracks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ class TestAsyncAudioTracks: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -279,7 +279,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -292,7 +292,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -308,21 +308,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.delete( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -330,7 +330,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_copy(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -339,7 +339,7 @@ async def test_method_copy(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", @@ -349,7 +349,7 @@ async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -362,7 +362,7 @@ async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) as response: @@ -378,14 +378,14 @@ async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> N async def test_path_params_copy(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.audio_tracks.with_raw_response.copy( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", label="director commentary", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.copy( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) @@ -393,7 +393,7 @@ async def test_path_params_copy(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -402,7 +402,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", default=True, @@ -413,7 +413,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -426,7 +426,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) as response: @@ -442,21 +442,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="", identifier="ea95132c15732412d22c1476fa83f27a", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.edit( - "ea95132c15732412d22c1476fa83f27a", + audio_identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `audio_identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.edit( - "", + audio_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) @@ -464,7 +464,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: audio_track = await async_client.stream.audio_tracks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AudioTrackGetResponse], audio_track, path=["response"]) @@ -472,7 +472,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -484,7 +484,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.audio_tracks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -499,12 +499,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.audio_tracks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.audio_tracks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_captions.py b/tests/api_resources/stream/test_captions.py index 4361d07217d..75cf3073069 100644 --- a/tests/api_resources/stream/test_captions.py +++ b/tests/api_resources/stream/test_captions.py @@ -20,7 +20,7 @@ class TestCaptions: @parametrize def test_method_get(self, client: Cloudflare) -> None: caption = client.stream.captions.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.captions.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.captions.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncCaptions: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: caption = await async_client.stream.captions.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CaptionGetResponse], caption, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.captions.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.captions.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.captions.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_downloads.py b/tests/api_resources/stream/test_downloads.py index 2940e0ff0d6..94e6dd14371 100644 --- a/tests/api_resources/stream/test_downloads.py +++ b/tests/api_resources/stream/test_downloads.py @@ -24,7 +24,7 @@ class TestDownloads: @parametrize def test_method_create(self, client: Cloudflare) -> None: download = client.stream.downloads.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -62,14 +62,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.downloads.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: download = client.stream.downloads.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) @@ -85,7 +85,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -97,7 +97,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -112,20 +112,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.downloads.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: download = client.stream.downloads.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) @@ -133,7 +133,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -145,7 +145,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.downloads.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -160,13 +160,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.downloads.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,7 +177,7 @@ class TestAsyncDownloads: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -186,7 +186,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -199,7 +199,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -215,14 +215,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.downloads.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.downloads.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -230,7 +230,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadDeleteResponse], download, path=["response"]) @@ -238,7 +238,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -250,7 +250,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -265,20 +265,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.downloads.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.downloads.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: download = await async_client.stream.downloads.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DownloadGetResponse], download, path=["response"]) @@ -286,7 +286,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -298,7 +298,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.downloads.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -313,12 +313,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.downloads.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.downloads.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_embed.py b/tests/api_resources/stream/test_embed.py index 1f7066ff514..1019efe5e4c 100644 --- a/tests/api_resources/stream/test_embed.py +++ b/tests/api_resources/stream/test_embed.py @@ -19,7 +19,7 @@ class TestEmbed: @parametrize def test_method_get(self, client: Cloudflare) -> None: embed = client.stream.embed.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, embed, path=["response"]) @@ -27,7 +27,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -39,7 +39,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.embed.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -54,13 +54,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.embed.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -71,7 +71,7 @@ class TestAsyncEmbed: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: embed = await async_client.stream.embed.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(str, embed, path=["response"]) @@ -79,7 +79,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -91,7 +91,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.embed.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -106,12 +106,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.embed.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.embed.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_keys.py b/tests/api_resources/stream/test_keys.py index 14b7d11cef2..feb60741e82 100644 --- a/tests/api_resources/stream/test_keys.py +++ b/tests/api_resources/stream/test_keys.py @@ -62,7 +62,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: key = client.stream.keys.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) @@ -70,7 +70,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -82,7 +82,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.keys.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -97,13 +97,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.keys.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -194,7 +194,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: key = await async_client.stream.keys.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeyDeleteResponse], key, path=["response"]) @@ -202,7 +202,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -214,7 +214,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.keys.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -229,13 +229,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.keys.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.keys.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_live_inputs.py b/tests/api_resources/stream/test_live_inputs.py index 2e2f8f3e4d1..c34ea9ecd6f 100644 --- a/tests/api_resources/stream/test_live_inputs.py +++ b/tests/api_resources/stream/test_live_inputs.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -85,9 +85,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -102,7 +102,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -114,7 +114,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -129,13 +129,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.update( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -188,7 +188,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert live_input is None @@ -196,7 +196,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -208,7 +208,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -223,20 +223,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.delete( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: live_input = client.stream.live_inputs.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -244,7 +244,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -256,7 +256,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.live_inputs.with_streaming_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -271,13 +271,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): client.stream.live_inputs.with_raw_response.get( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -296,7 +296,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -342,7 +342,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -350,9 +350,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", - default_creator="string", + default_creator="defaultCreator", delete_recording_after_days=45, meta={"name": "test stream 1"}, recording={ @@ -367,7 +367,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -379,7 +379,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -394,13 +394,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.with_raw_response.update( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.update( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -453,7 +453,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert live_input is None @@ -461,7 +461,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -473,7 +473,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -488,20 +488,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.with_raw_response.delete( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.delete( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: live_input = await async_client.stream.live_inputs.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[LiveInput], live_input, path=["response"]) @@ -509,7 +509,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -521,7 +521,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.live_inputs.with_streaming_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -536,12 +536,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.live_inputs.with_raw_response.get( - "66be4bf738797e01e1fca35a7bdecdcd", + live_input_identifier="66be4bf738797e01e1fca35a7bdecdcd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `live_input_identifier` but received ''"): await async_client.stream.live_inputs.with_raw_response.get( - "", + live_input_identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_token.py b/tests/api_resources/stream/test_token.py index 0d94826e27c..723546ff70c 100644 --- a/tests/api_resources/stream/test_token.py +++ b/tests/api_resources/stream/test_token.py @@ -20,7 +20,7 @@ class TestToken: @parametrize def test_method_create(self, client: Cloudflare) -> None: token = client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: token = client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="ab0d4ef71g4425f8dcba9041231813000", access_rules=[ @@ -61,7 +61,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.stream.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -73,7 +73,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.stream.token.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -88,13 +88,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.token.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -105,7 +105,7 @@ class TestAsyncToken: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: token = await async_client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TokenCreateResponse], token, path=["response"]) @@ -113,7 +113,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.stream.token.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", id="ab0d4ef71g4425f8dcba9041231813000", access_rules=[ @@ -146,7 +146,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.token.with_streaming_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -173,12 +173,12 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.token.with_raw_response.create( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.token.with_raw_response.create( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py index 78838fa8e9a..911dd1d6ad7 100644 --- a/tests/api_resources/stream/test_watermarks.py +++ b/tests/api_resources/stream/test_watermarks.py @@ -119,7 +119,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) @@ -127,7 +127,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -154,20 +154,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.watermarks.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) @@ -175,7 +175,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.watermarks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -202,13 +202,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.watermarks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -317,7 +317,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[WatermarkDeleteResponse], watermark, path=["response"]) @@ -325,7 +325,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -337,7 +337,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -352,20 +352,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.watermarks.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.watermarks.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Watermark], watermark, path=["response"]) @@ -373,7 +373,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -385,7 +385,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.watermarks.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -400,12 +400,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.watermarks.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.watermarks.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 53f68ccb9e1..fca546cad37 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -31,7 +31,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: account_id={}, name="Demo Account", settings={ - "abuse_contact_email": "string", + "abuse_contact_email": "abuse_contact_email", "default_nameservers": "cloudflare.standard", "enforce_twofactor": True, "use_account_custom_ns_by_default": True, @@ -149,7 +149,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare account_id={}, name="Demo Account", settings={ - "abuse_contact_email": "string", + "abuse_contact_email": "abuse_contact_email", "default_nameservers": "cloudflare.standard", "enforce_twofactor": True, "use_account_custom_ns_by_default": True, diff --git a/tests/api_resources/test_ai_gateway.py b/tests/api_resources/test_ai_gateway.py index 00e3af8c65d..8ab7ec39b18 100644 --- a/tests/api_resources/test_ai_gateway.py +++ b/tests/api_resources/test_ai_gateway.py @@ -93,7 +93,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -107,7 +107,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -125,7 +125,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -146,7 +146,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="", cache_invalidate_on_update=True, cache_ttl=0, @@ -158,7 +158,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.update( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -180,7 +180,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.list( account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", - order_by="string", + order_by="order_by", page=1, per_page=5, ) @@ -220,7 +220,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -228,7 +228,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -240,7 +240,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -255,20 +255,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.delete( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: ai_gateway = client.ai_gateway.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -276,7 +276,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.ai_gateway.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -288,7 +288,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.ai_gateway.with_streaming_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -303,13 +303,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.ai_gateway.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ai_gateway.with_raw_response.get( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -386,7 +386,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -400,7 +400,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -418,7 +418,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.update( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -439,7 +439,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.ai_gateway.with_raw_response.update( - "my-gateway", + id="my-gateway", account_id="", cache_invalidate_on_update=True, cache_ttl=0, @@ -451,7 +451,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.update( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", cache_invalidate_on_update=True, cache_ttl=0, @@ -473,7 +473,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ai_gateway = await async_client.ai_gateway.list( account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", id="my-gateway", - order_by="string", + order_by="order_by", page=1, per_page=5, ) @@ -513,7 +513,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"]) @@ -521,7 +521,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -533,7 +533,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.delete( - "string", + id="id", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -548,20 +548,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.ai_gateway.with_raw_response.delete( - "string", + id="id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.delete( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ai_gateway = await async_client.ai_gateway.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"]) @@ -569,7 +569,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.ai_gateway.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) @@ -581,7 +581,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.ai_gateway.with_streaming_response.get( - "my-gateway", + id="my-gateway", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) as response: assert not response.is_closed @@ -596,12 +596,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.ai_gateway.with_raw_response.get( - "my-gateway", + id="my-gateway", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ai_gateway.with_raw_response.get( - "", + id="", account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0", ) diff --git a/tests/api_resources/test_brand_protection.py b/tests/api_resources/test_brand_protection.py index 31b53da9ac7..0b9e116d432 100644 --- a/tests/api_resources/test_brand_protection.py +++ b/tests/api_resources/test_brand_protection.py @@ -77,7 +77,7 @@ def test_method_url_info(self, client: Cloudflare) -> None: def test_method_url_info_with_all_params(self, client: Cloudflare) -> None: brand_protection = client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", - url="string", + url="url", url_id_param={"url_id": 0}, ) assert_matches_type(Optional[Info], brand_protection, path=["response"]) @@ -174,7 +174,7 @@ async def test_method_url_info(self, async_client: AsyncCloudflare) -> None: async def test_method_url_info_with_all_params(self, async_client: AsyncCloudflare) -> None: brand_protection = await async_client.brand_protection.url_info( account_id="023e105f4ecef8ad9ca31a8372d0c353", - url="string", + url="url", url_id_param={"url_id": 0}, ) assert_matches_type(Optional[Info], brand_protection, path=["response"]) diff --git a/tests/api_resources/test_cache.py b/tests/api_resources/test_cache.py index d23c8672439..7af5c5be461 100644 --- a/tests/api_resources/test_cache.py +++ b/tests/api_resources/test_cache.py @@ -20,14 +20,14 @@ class TestCache: @parametrize def test_method_purge_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", tags=["a-cache-tag", "another-cache-tag"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -35,7 +35,7 @@ def test_method_purge_with_all_params_overload_1(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_purge_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_1(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,14 +66,14 @@ def test_path_params_purge_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", hosts=["www.example.com", "images.example.com"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -81,7 +81,7 @@ def test_method_purge_with_all_params_overload_2(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_purge_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_2(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,14 +112,14 @@ def test_path_params_purge_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", prefixes=["www.example.com/foo", "images.example.com/bar/baz"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -127,7 +127,7 @@ def test_method_purge_with_all_params_overload_3(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -138,7 +138,7 @@ def test_raw_response_purge_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_3(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -158,14 +158,14 @@ def test_path_params_purge_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", purge_everything=True, ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -173,7 +173,7 @@ def test_method_purge_with_all_params_overload_4(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -184,7 +184,7 @@ def test_raw_response_purge_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_4(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,14 +204,14 @@ def test_path_params_purge_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -219,7 +219,7 @@ def test_method_purge_with_all_params_overload_5(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -230,7 +230,7 @@ def test_raw_response_purge_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_5(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,14 +250,14 @@ def test_path_params_purge_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_purge_overload_6(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> None: cache = client.cache.purge( - zone_id="string", + zone_id="zone_id", files=[ { "headers": { @@ -282,7 +282,7 @@ def test_method_purge_with_all_params_overload_6(self, client: Cloudflare) -> No @parametrize def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None: response = client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -293,7 +293,7 @@ def test_raw_response_purge_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_purge_overload_6(self, client: Cloudflare) -> None: with client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,14 +317,14 @@ class TestAsyncCache: @parametrize async def test_method_purge_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", tags=["a-cache-tag", "another-cache-tag"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -332,7 +332,7 @@ async def test_method_purge_with_all_params_overload_1(self, async_client: Async @parametrize async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -343,7 +343,7 @@ async def test_raw_response_purge_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -363,14 +363,14 @@ async def test_path_params_purge_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", hosts=["www.example.com", "images.example.com"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -378,7 +378,7 @@ async def test_method_purge_with_all_params_overload_2(self, async_client: Async @parametrize async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -389,7 +389,7 @@ async def test_raw_response_purge_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -409,14 +409,14 @@ async def test_path_params_purge_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", prefixes=["www.example.com/foo", "images.example.com/bar/baz"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -424,7 +424,7 @@ async def test_method_purge_with_all_params_overload_3(self, async_client: Async @parametrize async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -435,7 +435,7 @@ async def test_raw_response_purge_overload_3(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -455,14 +455,14 @@ async def test_path_params_purge_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", purge_everything=True, ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -470,7 +470,7 @@ async def test_method_purge_with_all_params_overload_4(self, async_client: Async @parametrize async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -481,7 +481,7 @@ async def test_raw_response_purge_overload_4(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,14 +501,14 @@ async def test_path_params_purge_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", files=["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"], ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @@ -516,7 +516,7 @@ async def test_method_purge_with_all_params_overload_5(self, async_client: Async @parametrize async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -527,7 +527,7 @@ async def test_raw_response_purge_overload_5(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -547,14 +547,14 @@ async def test_path_params_purge_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_purge_overload_6(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", ) assert_matches_type(Optional[CachePurgeResponse], cache, path=["response"]) @parametrize async def test_method_purge_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: cache = await async_client.cache.purge( - zone_id="string", + zone_id="zone_id", files=[ { "headers": { @@ -579,7 +579,7 @@ async def test_method_purge_with_all_params_overload_6(self, async_client: Async @parametrize async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.cache.with_raw_response.purge( - zone_id="string", + zone_id="zone_id", ) assert response.is_closed is True @@ -590,7 +590,7 @@ async def test_raw_response_purge_overload_6(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_purge_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.cache.with_streaming_response.purge( - zone_id="string", + zone_id="zone_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_calls.py b/tests/api_resources/test_calls.py index a518aded095..29330b4e86e 100644 --- a/tests/api_resources/test_calls.py +++ b/tests/api_resources/test_calls.py @@ -71,7 +71,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: call = client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -79,7 +79,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: call = client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) @@ -88,7 +88,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -115,13 +115,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.calls.with_raw_response.update( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -166,7 +166,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: call = client.calls.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -174,7 +174,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -186,7 +186,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -201,20 +201,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.calls.with_raw_response.delete( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: call = client.calls.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -222,7 +222,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -234,7 +234,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.calls.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -249,13 +249,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.calls.with_raw_response.get( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -312,7 +312,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -320,7 +320,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="production-realtime-app", ) @@ -329,7 +329,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -341,7 +341,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -356,13 +356,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.calls.with_raw_response.update( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.calls.with_raw_response.update( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -407,7 +407,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -415,7 +415,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -427,7 +427,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -442,20 +442,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.calls.with_raw_response.delete( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.calls.with_raw_response.delete( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CallsApp], call, path=["response"]) @@ -463,7 +463,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -475,7 +475,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.calls.with_streaming_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -490,12 +490,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.calls.with_raw_response.get( - "2a95132c15732412d22c1476fa83f27a", + app_id="2a95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.calls.with_raw_response.get( - "", + app_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py index 8f8328f80e7..b76f1f75951 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -119,7 +119,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -127,7 +127,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -154,20 +154,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): client.client_certificates.with_raw_response.delete( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -175,7 +175,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -202,20 +202,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): client.client_certificates.with_raw_response.edit( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -223,7 +223,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -235,7 +235,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.client_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -250,13 +250,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): client.client_certificates.with_raw_response.get( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -363,7 +363,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -371,7 +371,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -383,7 +383,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -398,20 +398,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.client_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): await async_client.client_certificates.with_raw_response.delete( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -419,7 +419,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -431,7 +431,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -446,20 +446,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.client_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): await async_client.client_certificates.with_raw_response.edit( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ClientCertificate], client_certificate, path=["response"]) @@ -467,7 +467,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -479,7 +479,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.client_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -494,12 +494,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.client_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + client_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `client_certificate_id` but received ''"): await async_client.client_certificates.with_raw_response.get( - "", + client_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py index 3612c9a1544..e0e754e6cf8 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -135,7 +135,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) @@ -143,7 +143,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -155,7 +155,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -170,20 +170,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.delete( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) @@ -191,7 +191,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", bundle_method="ubiquitous", certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", @@ -204,7 +204,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -216,7 +216,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -231,20 +231,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.edit( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) @@ -252,7 +252,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -264,7 +264,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -279,13 +279,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): client.custom_certificates.with_raw_response.get( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -404,7 +404,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateDeleteResponse], custom_certificate, path=["response"]) @@ -412,7 +412,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -424,7 +424,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -439,20 +439,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.delete( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateEditResponse], custom_certificate, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", bundle_method="ubiquitous", certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", @@ -473,7 +473,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -485,7 +485,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -500,20 +500,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.edit( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomCertificateGetResponse], custom_certificate, path=["response"]) @@ -521,7 +521,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -533,7 +533,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -548,12 +548,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_certificate_id` but received ''"): await async_client.custom_certificates.with_raw_response.get( - "", + custom_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_custom_hostnames.py b/tests/api_resources/test_custom_hostnames.py index 1ca4d8d7318..b749c8eacae 100644 --- a/tests/api_resources/test_custom_hostnames.py +++ b/tests/api_resources/test_custom_hostnames.py @@ -152,7 +152,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) @@ -160,7 +160,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -187,20 +187,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.delete( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) @@ -208,7 +208,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", custom_metadata={"key": "value"}, custom_origin_server="origin2.example.com", @@ -235,7 +235,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -247,7 +247,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -262,20 +262,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.edit( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_hostname = client.custom_hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) @@ -283,7 +283,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -295,7 +295,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -310,13 +310,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): client.custom_hostnames.with_raw_response.get( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -452,7 +452,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomHostnameDeleteResponse, custom_hostname, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -472,7 +472,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -487,20 +487,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.delete( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameEditResponse], custom_hostname, path=["response"]) @@ -508,7 +508,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", custom_metadata={"key": "value"}, custom_origin_server="origin2.example.com", @@ -535,7 +535,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -547,7 +547,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -562,20 +562,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.edit( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_hostname = await async_client.custom_hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomHostnameGetResponse], custom_hostname, path=["response"]) @@ -583,7 +583,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -595,7 +595,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -610,12 +610,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.custom_hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + custom_hostname_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_hostname_id` but received ''"): await async_client.custom_hostnames.with_raw_response.get( - "", + custom_hostname_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py index a0ed2167a7d..e64edbc4327 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -76,7 +76,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_nameserver = client.custom_nameservers.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) @@ -84,7 +84,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) @@ -96,7 +96,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.custom_nameservers.with_streaming_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) as response: assert not response.is_closed @@ -111,13 +111,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_ns_id` but received ''"): client.custom_nameservers.with_raw_response.delete( - "", + custom_ns_id="", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) @@ -255,7 +255,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_nameserver = await async_client.custom_nameservers.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) assert_matches_type(Optional[CustomNameserverDeleteResponse], custom_nameserver, path=["response"]) @@ -263,7 +263,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) @@ -275,7 +275,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_nameservers.with_streaming_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) as response: assert not response.is_closed @@ -290,13 +290,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.custom_nameservers.with_raw_response.delete( - "ns1.example.com", + custom_ns_id="ns1.example.com", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_ns_id` but received ''"): await async_client.custom_nameservers.with_raw_response.delete( - "", + custom_ns_id="", account_id="372e67954025e0ba6aaa6d586b9e0b59", ) diff --git a/tests/api_resources/test_email_routing.py b/tests/api_resources/test_email_routing.py index e31f84ff008..3aafbd93e2d 100644 --- a/tests/api_resources/test_email_routing.py +++ b/tests/api_resources/test_email_routing.py @@ -20,7 +20,7 @@ class TestEmailRouting: @parametrize def test_method_disable(self, client: Cloudflare) -> None: email_routing = client.email_routing.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -28,7 +28,7 @@ def test_method_disable(self, client: Cloudflare) -> None: @parametrize def test_raw_response_disable(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -40,7 +40,7 @@ def test_raw_response_disable(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_disable(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -55,14 +55,14 @@ def test_streaming_response_disable(self, client: Cloudflare) -> None: def test_path_params_disable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.with_raw_response.disable( - "", + zone_identifier="", body={}, ) @parametrize def test_method_enable(self, client: Cloudflare) -> None: email_routing = client.email_routing.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -70,7 +70,7 @@ def test_method_enable(self, client: Cloudflare) -> None: @parametrize def test_raw_response_enable(self, client: Cloudflare) -> None: response = client.email_routing.with_raw_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -82,7 +82,7 @@ def test_raw_response_enable(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_enable(self, client: Cloudflare) -> None: with client.email_routing.with_streaming_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -97,7 +97,7 @@ def test_streaming_response_enable(self, client: Cloudflare) -> None: def test_path_params_enable(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.email_routing.with_raw_response.enable( - "", + zone_identifier="", body={}, ) @@ -146,7 +146,7 @@ class TestAsyncEmailRouting: @parametrize async def test_method_disable(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -154,7 +154,7 @@ async def test_method_disable(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -166,7 +166,7 @@ async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None @parametrize async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.disable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -181,14 +181,14 @@ async def test_streaming_response_disable(self, async_client: AsyncCloudflare) - async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.with_raw_response.disable( - "", + zone_identifier="", body={}, ) @parametrize async def test_method_enable(self, async_client: AsyncCloudflare) -> None: email_routing = await async_client.email_routing.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) assert_matches_type(Optional[Settings], email_routing, path=["response"]) @@ -196,7 +196,7 @@ async def test_method_enable(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: response = await async_client.email_routing.with_raw_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -208,7 +208,7 @@ async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> None: async with async_client.email_routing.with_streaming_response.enable( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -223,7 +223,7 @@ async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.email_routing.with_raw_response.enable( - "", + zone_identifier="", body={}, ) diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py index 58215dc774b..c088a4f8f9a 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -28,7 +28,7 @@ class TestFilters: def test_method_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -39,7 +39,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -70,7 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -79,7 +79,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -91,7 +91,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -106,7 +106,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -124,14 +124,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -140,7 +140,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @@ -149,7 +149,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b61", description="browsers", expression="php", @@ -165,7 +165,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -177,7 +177,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,14 +192,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -209,7 +209,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -222,7 +222,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -238,13 +238,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): filter = client.filters.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -262,7 +262,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -275,7 +275,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.filters.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -291,13 +291,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.filters.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -310,7 +310,7 @@ class TestAsyncFilters: async def test_method_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -321,7 +321,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -335,7 +335,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -352,7 +352,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -361,7 +361,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -373,7 +373,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -388,7 +388,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -406,14 +406,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.update( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.update( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -422,7 +422,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @@ -431,7 +431,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", id="372e67954025e0ba6aaa6d586b9e0b61", description="browsers", expression="php", @@ -447,7 +447,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -459,7 +459,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -474,14 +474,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -491,7 +491,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -504,7 +504,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -520,13 +520,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -534,7 +534,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): filter = await async_client.filters.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -544,7 +544,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -557,7 +557,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.filters.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -573,12 +573,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.filters.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b61", + id="372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.filters.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index c01a5247d8b..59a3c637620 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -105,7 +105,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -115,7 +115,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -151,7 +151,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -182,7 +182,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -190,7 +190,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.update( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -246,7 +246,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) @@ -254,7 +254,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -266,7 +266,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -281,20 +281,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -304,7 +304,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -340,7 +340,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -354,7 +354,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -371,7 +371,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -379,7 +379,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.edit( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -388,7 +388,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) @@ -396,7 +396,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -408,7 +408,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.healthchecks.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -423,13 +423,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): client.healthchecks.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -521,7 +521,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -531,7 +531,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -567,7 +567,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -581,7 +581,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -598,7 +598,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -606,7 +606,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.update( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -662,7 +662,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(HealthcheckDeleteResponse, healthcheck, path=["response"]) @@ -670,7 +670,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -682,7 +682,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -697,20 +697,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.delete( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -720,7 +720,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -756,7 +756,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -770,7 +770,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -787,7 +787,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", address="www.example.com", name="server-1", @@ -795,7 +795,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.edit( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", address="www.example.com", name="server-1", @@ -804,7 +804,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Healthcheck, healthcheck, path=["response"]) @@ -812,7 +812,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -824,7 +824,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.healthchecks.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -839,12 +839,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.healthchecks.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + healthcheck_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `healthcheck_id` but received ''"): await async_client.healthchecks.with_raw_response.get( - "", + healthcheck_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_ips.py b/tests/api_resources/test_ips.py index 165880daa49..e013f501f77 100644 --- a/tests/api_resources/test_ips.py +++ b/tests/api_resources/test_ips.py @@ -25,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ip = client.ips.list( - networks="string", + networks="networks", ) assert_matches_type(Optional[IPListResponse], ip, path=["response"]) @@ -61,7 +61,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.ips.list( - networks="string", + networks="networks", ) assert_matches_type(Optional[IPListResponse], ip, path=["response"]) diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index f1859888ebc..0dae2518fe2 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -128,7 +128,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) @@ -136,7 +136,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -148,7 +148,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -163,7 +163,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -171,14 +171,14 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): client.keyless_certificates.with_raw_response.delete( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -186,7 +186,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=False, host="example.com", @@ -202,7 +202,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -214,7 +214,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -229,7 +229,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -237,14 +237,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): client.keyless_certificates.with_raw_response.edit( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -252,7 +252,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -264,7 +264,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.keyless_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -279,7 +279,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -287,7 +287,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): client.keyless_certificates.with_raw_response.get( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -402,7 +402,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificateDeleteResponse], keyless_certificate, path=["response"]) @@ -410,7 +410,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -422,7 +422,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -437,7 +437,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.keyless_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -445,14 +445,14 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): await async_client.keyless_certificates.with_raw_response.delete( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=False, host="example.com", @@ -476,7 +476,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -488,7 +488,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -503,7 +503,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.keyless_certificates.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -511,14 +511,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): await async_client.keyless_certificates.with_raw_response.edit( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[KeylessCertificate], keyless_certificate, path=["response"]) @@ -526,7 +526,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -538,7 +538,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.keyless_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -553,7 +553,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.keyless_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + keyless_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) @@ -561,6 +561,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `keyless_certificate_id` but received ''" ): await async_client.keyless_certificates.with_raw_response.get( - "", + keyless_certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py index bf36879da54..915976705c6 100644 --- a/tests/api_resources/test_load_balancers.py +++ b/tests/api_resources/test_load_balancers.py @@ -319,7 +319,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -334,7 +334,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -565,7 +565,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -584,7 +584,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -606,7 +606,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -619,7 +619,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.update( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -671,7 +671,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) @@ -679,7 +679,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -691,7 +691,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -706,20 +706,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.delete( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -727,7 +727,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", adaptive_routing={"failover_across_pools": True}, country_pools={ @@ -958,7 +958,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -970,7 +970,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -985,20 +985,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.edit( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -1006,7 +1006,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1018,7 +1018,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.load_balancers.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -1033,13 +1033,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): client.load_balancers.with_raw_response.get( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1345,7 +1345,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1360,7 +1360,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1591,7 +1591,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1610,7 +1610,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1632,7 +1632,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1645,7 +1645,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.update( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", default_pools=[ "17b5962d775c646f3f9725cbc7a53df4", @@ -1697,7 +1697,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancerDeleteResponse, load_balancer, path=["response"]) @@ -1705,7 +1705,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1717,7 +1717,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -1732,20 +1732,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.delete( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -1753,7 +1753,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", adaptive_routing={"failover_across_pools": True}, country_pools={ @@ -1984,7 +1984,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -1996,7 +1996,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -2011,20 +2011,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.edit( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(LoadBalancer, load_balancer, path=["response"]) @@ -2032,7 +2032,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) @@ -2044,7 +2044,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.load_balancers.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -2059,12 +2059,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.load_balancers.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + load_balancer_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"): await async_client.load_balancers.with_raw_response.get( - "", + load_balancer_id="", zone_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/test_memberships.py b/tests/api_resources/test_memberships.py index cb5e1358a4c..7d30c588011 100644 --- a/tests/api_resources/test_memberships.py +++ b/tests/api_resources/test_memberships.py @@ -26,7 +26,7 @@ class TestMemberships: @parametrize def test_method_update(self, client: Cloudflare) -> None: membership = client.memberships.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) assert_matches_type(Optional[MembershipUpdateResponse], membership, path=["response"]) @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.memberships.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) @@ -46,7 +46,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.memberships.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) as response: assert not response.is_closed @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): client.memberships.with_raw_response.update( - "", + membership_id="", status="accepted", ) @@ -186,7 +186,7 @@ class TestAsyncMemberships: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: membership = await async_client.memberships.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) assert_matches_type(Optional[MembershipUpdateResponse], membership, path=["response"]) @@ -194,7 +194,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.memberships.with_raw_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) @@ -206,7 +206,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.memberships.with_streaming_response.update( - "4536bcfad5faccb111b47003c79917fa", + membership_id="4536bcfad5faccb111b47003c79917fa", status="accepted", ) as response: assert not response.is_closed @@ -221,7 +221,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `membership_id` but received ''"): await async_client.memberships.with_raw_response.update( - "", + membership_id="", status="accepted", ) diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index 70101b484c8..666b1c3c621 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -119,7 +119,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -127,7 +127,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -139,7 +139,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -154,20 +154,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.with_raw_response.delete( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -175,7 +175,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.mtls_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -202,13 +202,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): client.mtls_certificates.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -314,7 +314,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -322,7 +322,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -334,7 +334,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -349,20 +349,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.mtls_certificates.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.with_raw_response.delete( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[MTLSCertificate], mtls_certificate, path=["response"]) @@ -370,7 +370,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -382,7 +382,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.mtls_certificates.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -397,12 +397,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.mtls_certificates.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + mtls_certificate_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `mtls_certificate_id` but received ''"): await async_client.mtls_certificates.with_raw_response.get( - "", + mtls_certificate_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py index cd43e2ee233..53fa7d4c873 100644 --- a/tests/api_resources/test_origin_tls_client_auth.py +++ b/tests/api_resources/test_origin_tls_client_auth.py @@ -110,7 +110,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -145,20 +145,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) @@ -166,7 +166,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -178,7 +178,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.origin_tls_client_auth.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.origin_tls_client_auth.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -294,7 +294,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthDeleteResponse], origin_tls_client_auth, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -314,7 +314,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -329,20 +329,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.delete( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[OriginTLSClientAuthGetResponse], origin_tls_client_auth, path=["response"]) @@ -350,7 +350,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.origin_tls_client_auth.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -377,12 +377,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + certificate_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.origin_tls_client_auth.with_raw_response.get( - "", + certificate_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_pagerules.py b/tests/api_resources/test_pagerules.py index 3a54b5d879f..602cbd4d6f6 100644 --- a/tests/api_resources/test_pagerules.py +++ b/tests/api_resources/test_pagerules.py @@ -156,7 +156,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -176,7 +176,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_method_update_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -220,7 +220,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -243,7 +243,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -269,7 +269,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", actions=[{}, {}, {}], targets=[ @@ -285,7 +285,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.update( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -359,7 +359,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -369,7 +369,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -382,7 +382,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -398,13 +398,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.delete( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -422,7 +422,7 @@ def test_method_edit(self, client: Cloudflare) -> None: def test_method_edit_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -466,7 +466,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -479,7 +479,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: def test_streaming_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -495,13 +495,13 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.edit( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -509,7 +509,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = client.pagerules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -519,7 +519,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -532,7 +532,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.pagerules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -548,13 +548,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): client.pagerules.with_raw_response.get( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -692,7 +692,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -712,7 +712,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -756,7 +756,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -779,7 +779,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -805,7 +805,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", actions=[{}, {}, {}], targets=[ @@ -821,7 +821,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.update( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[{}, {}, {}], targets=[ @@ -895,7 +895,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -905,7 +905,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -918,7 +918,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -934,13 +934,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.delete( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -948,7 +948,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -958,7 +958,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", actions=[ { @@ -1002,7 +1002,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1015,7 +1015,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1031,13 +1031,13 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.edit( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1045,7 +1045,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): pagerule = await async_client.pagerules.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1055,7 +1055,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1068,7 +1068,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.pagerules.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1084,12 +1084,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pagerule_id="023e105f4ecef8ad9ca31a8372d0c353", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pagerule_id` but received ''"): await async_client.pagerules.with_raw_response.get( - "", + pagerule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_pcaps.py b/tests/api_resources/test_pcaps.py index c290dfd9e3e..43798f1c52d 100644 --- a/tests/api_resources/test_pcaps.py +++ b/tests/api_resources/test_pcaps.py @@ -210,7 +210,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: pcap = client.pcaps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PCAPGetResponse, pcap, path=["response"]) @@ -218,7 +218,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -230,7 +230,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.pcaps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -245,13 +245,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): client.pcaps.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -451,7 +451,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PCAPGetResponse, pcap, path=["response"]) @@ -459,7 +459,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -471,7 +471,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.pcaps.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -486,12 +486,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.pcaps.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + pcap_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"): await async_client.pcaps.with_raw_response.get( - "", + pcap_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 46cabad8fde..8a3ef3ee191 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: plan = client.plans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AvailableRatePlan, plan, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.plans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -94,13 +94,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_identifier` but received ''"): client.plans.with_raw_response.get( - "", + plan_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: plan = await async_client.plans.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AvailableRatePlan, plan, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -169,7 +169,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.plans.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -184,12 +184,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.plans.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + plan_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_identifier` but received ''"): await async_client.plans.with_raw_response.get( - "", + plan_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py index 4cb9c1c38c2..87752b02448 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -68,7 +68,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: queue = client.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -77,7 +77,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -90,7 +90,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) as response: @@ -106,14 +106,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={"queue_name": "renamed-example-queue"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -159,7 +159,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: queue = client.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) @@ -167,7 +167,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -179,7 +179,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -194,20 +194,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: queue = client.queues.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Queue], queue, path=["response"]) @@ -215,7 +215,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -227,7 +227,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.queues.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -242,13 +242,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): client.queues.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -301,7 +301,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -310,7 +310,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -323,7 +323,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) as response: @@ -339,14 +339,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", body={"queue_name": "renamed-example-queue"}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.update( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={"queue_name": "renamed-example-queue"}, ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[QueueDeleteResponse], queue, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -412,7 +412,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -427,20 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.delete( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Queue], queue, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -460,7 +460,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.queues.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -475,12 +475,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.queues.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + queue_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_id` but received ''"): await async_client.queues.with_raw_response.get( - "", + queue_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_rate_limits.py b/tests/api_resources/test_rate_limits.py index f03e02cb30c..0fd1a584ca0 100644 --- a/tests/api_resources/test_rate_limits.py +++ b/tests/api_resources/test_rate_limits.py @@ -31,7 +31,7 @@ class TestRateLimits: def test_method_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -56,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -81,7 +81,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) @@ -90,7 +90,7 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=1, ) @@ -101,7 +101,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -113,7 +113,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,14 +128,14 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.list( - "", + zone_identifier="", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -145,7 +145,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -158,7 +158,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -174,13 +174,13 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -201,7 +201,7 @@ def test_method_edit(self, client: Cloudflare) -> None: def test_raw_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -216,7 +216,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: def test_streaming_response_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -234,14 +234,14 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -250,7 +250,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = client.rate_limits.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -260,7 +260,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): response = client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -273,7 +273,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with client.rate_limits.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -289,13 +289,13 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.rate_limits.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -308,7 +308,7 @@ class TestAsyncRateLimits: async def test_method_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -319,7 +319,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -333,7 +333,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: assert not response.is_closed @@ -350,7 +350,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.create( - "", + zone_identifier="", body={}, ) @@ -358,7 +358,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePaginationArray[RateLimit], rate_limit, path=["response"]) @@ -367,7 +367,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", page=1, per_page=1, ) @@ -378,7 +378,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -390,7 +390,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -405,14 +405,14 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.list( - "", + zone_identifier="", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -422,7 +422,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -435,7 +435,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -451,13 +451,13 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.delete( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.delete( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -466,7 +466,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -478,7 +478,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -493,7 +493,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -511,14 +511,14 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.edit( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.edit( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -527,7 +527,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): rate_limit = await async_client.rate_limits.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -537,7 +537,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): response = await async_client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -550,7 +550,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): async with async_client.rate_limits.with_streaming_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -566,12 +566,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.warns(DeprecationWarning): with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.rate_limits.with_raw_response.get( - "372e67954025e0ba6aaa6d586b9e0b59", + id="372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.rate_limits.with_raw_response.get( - "", + id="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index 97d3d27207e..d8877f10ca1 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -92,7 +92,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -105,7 +105,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,16 +149,16 @@ def test_path_params_create(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: ruleset = client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) @@ -166,7 +166,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[ { "action": "block", @@ -217,7 +217,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -229,9 +229,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -243,9 +243,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -260,30 +260,30 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.update( - "", + ruleset_id="", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -291,7 +291,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -299,7 +299,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -311,7 +311,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -331,15 +331,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -347,8 +347,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -356,8 +356,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -369,8 +369,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -385,28 +385,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.delete( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -414,8 +414,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -423,8 +423,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -436,8 +436,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -452,20 +452,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): client.rulesets.with_raw_response.get( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @@ -480,7 +480,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -541,7 +541,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -554,7 +554,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -570,7 +570,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -598,16 +598,16 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) @@ -615,7 +615,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[ { "action": "block", @@ -666,7 +666,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "ref": "my_ref", }, ], - account_id="string", + account_id="account_id", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -678,9 +678,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -692,9 +692,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -709,30 +709,30 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.update( - "", + ruleset_id="", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.update( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -740,7 +740,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @@ -748,7 +748,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -760,7 +760,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -780,15 +780,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -796,8 +796,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert ruleset is None @@ -805,8 +805,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -818,8 +818,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -834,28 +834,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.delete( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.delete( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -863,8 +863,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -872,8 +872,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) assert response.is_closed is True @@ -885,8 +885,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -901,18 +901,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"): await async_client.rulesets.with_raw_response.get( - "", - account_id="string", + ruleset_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", + ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.rulesets.with_raw_response.get( - "2f2feab2026849078ba485f918791bdc", - account_id="string", + ruleset_id="2f2feab2026849078ba485f918791bdc", + account_id="account_id", ) diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index cad43decc6a..25af699eda9 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -22,7 +22,7 @@ class TestSnippets: @parametrize def test_method_update(self, client: Cloudflare) -> None: snippet = client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -31,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: snippet = client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, @@ -42,7 +42,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -55,7 +55,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -71,13 +71,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.update( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -122,7 +122,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: snippet = client.snippets.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) @@ -130,7 +130,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -142,7 +142,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -157,20 +157,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.delete( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: snippet = client.snippets.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -178,7 +178,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -190,7 +190,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.snippets.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -205,13 +205,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): client.snippets.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -223,7 +223,7 @@ class TestAsyncSnippets: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -232,7 +232,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", files="export { async function fetch(request, env) {return new Response('some_response') } }", metadata={"main_module": "main.js"}, @@ -243,7 +243,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -256,7 +256,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -272,13 +272,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.update( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.update( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -323,7 +323,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SnippetDeleteResponse, snippet, path=["response"]) @@ -331,7 +331,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -343,7 +343,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -358,20 +358,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.delete( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.delete( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Snippet], snippet, path=["response"]) @@ -379,7 +379,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -391,7 +391,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.snippets.with_streaming_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -406,12 +406,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.snippets.with_raw_response.get( - "snippet_name_01", + snippet_name="snippet_name_01", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `snippet_name` but received ''"): await async_client.snippets.with_raw_response.get( - "", + snippet_name="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index 5bab50b63ce..56ed1c0d953 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -142,7 +142,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: stream = client.stream.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert stream is None @@ -150,7 +150,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -162,7 +162,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -177,20 +177,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: stream = client.stream.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Video], stream, path=["response"]) @@ -198,7 +198,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -210,7 +210,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.stream.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -225,13 +225,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.stream.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -362,7 +362,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert stream is None @@ -370,7 +370,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -382,7 +382,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -397,20 +397,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.with_raw_response.delete( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.with_raw_response.delete( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Video], stream, path=["response"]) @@ -418,7 +418,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -430,7 +430,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.stream.with_streaming_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -445,12 +445,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.stream.with_raw_response.get( - "ea95132c15732412d22c1476fa83f27a", + identifier="ea95132c15732412d22c1476fa83f27a", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.stream.with_raw_response.get( - "", + identifier="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 7f4f56f32cf..e756ce625ff 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -27,15 +27,15 @@ class TestSubscriptions: @parametrize def test_method_create(self, client: Cloudflare) -> None: subscription = client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: subscription = client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -73,7 +73,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,13 +98,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: subscription = client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @@ -112,9 +112,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: subscription = client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - app={"install_id": "string"}, + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -152,7 +152,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -164,7 +164,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -179,7 +179,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -187,7 +187,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): client.subscriptions.with_raw_response.update( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -232,7 +232,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: subscription = client.subscriptions.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) @@ -240,7 +240,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -252,7 +252,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.subscriptions.with_streaming_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -267,7 +267,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -275,7 +275,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): client.subscriptions.with_raw_response.delete( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -324,15 +324,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -370,7 +370,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -381,7 +381,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -395,13 +395,13 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @@ -409,9 +409,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", - app={"install_id": "string"}, + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -449,7 +449,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -461,7 +461,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -476,7 +476,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -484,7 +484,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): await async_client.subscriptions.with_raw_response.update( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -529,7 +529,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SubscriptionDeleteResponse, subscription, path=["response"]) @@ -537,7 +537,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -549,7 +549,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.subscriptions.with_streaming_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -564,7 +564,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.subscriptions.with_raw_response.delete( - "506e3185e9c882d175a2d0cb0093d9f2", + subscription_identifier="506e3185e9c882d175a2d0cb0093d9f2", account_identifier="", ) @@ -572,7 +572,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `subscription_identifier` but received ''" ): await async_client.subscriptions.with_raw_response.delete( - "", + subscription_identifier="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_url_scanner.py b/tests/api_resources/test_url_scanner.py index f62a25e771b..452d2b50df3 100644 --- a/tests/api_resources/test_url_scanner.py +++ b/tests/api_resources/test_url_scanner.py @@ -21,29 +21,29 @@ class TestURLScanner: @parametrize def test_method_scan(self, client: Cloudflare) -> None: url_scanner = client.url_scanner.scan( - "string", + account_id="accountId", ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) @parametrize def test_method_scan_with_all_params(self, client: Cloudflare) -> None: url_scanner = client.url_scanner.scan( - "string", + account_id="accountId", account_scans=True, asn="13335", date_end=parse_datetime("2019-12-27T18:11:19.117Z"), date_start=parse_datetime("2019-12-27T18:11:19.117Z"), - hash="string", + hash="hash", hostname="example.com", ip="1.1.1.1", is_malicious=True, limit=100, - next_cursor="string", - page_asn="string", - page_hostname="string", - page_ip="string", - page_path="string", - page_url="string", + next_cursor="next_cursor", + page_asn="page_asn", + page_hostname="page_hostname", + page_ip="page_ip", + page_path="page_path", + page_url="page_url", path="/samples/subresource-integrity/", scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", url="https://example.com/?hello", @@ -53,7 +53,7 @@ def test_method_scan_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_scan(self, client: Cloudflare) -> None: response = client.url_scanner.with_raw_response.scan( - "string", + account_id="accountId", ) assert response.is_closed is True @@ -64,7 +64,7 @@ def test_raw_response_scan(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_scan(self, client: Cloudflare) -> None: with client.url_scanner.with_streaming_response.scan( - "string", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,7 +78,7 @@ def test_streaming_response_scan(self, client: Cloudflare) -> None: def test_path_params_scan(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.with_raw_response.scan( - "", + account_id="", ) @@ -88,29 +88,29 @@ class TestAsyncURLScanner: @parametrize async def test_method_scan(self, async_client: AsyncCloudflare) -> None: url_scanner = await async_client.url_scanner.scan( - "string", + account_id="accountId", ) assert_matches_type(URLScannerScanResponse, url_scanner, path=["response"]) @parametrize async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) -> None: url_scanner = await async_client.url_scanner.scan( - "string", + account_id="accountId", account_scans=True, asn="13335", date_end=parse_datetime("2019-12-27T18:11:19.117Z"), date_start=parse_datetime("2019-12-27T18:11:19.117Z"), - hash="string", + hash="hash", hostname="example.com", ip="1.1.1.1", is_malicious=True, limit=100, - next_cursor="string", - page_asn="string", - page_hostname="string", - page_ip="string", - page_path="string", - page_url="string", + next_cursor="next_cursor", + page_asn="page_asn", + page_hostname="page_hostname", + page_ip="page_ip", + page_path="page_path", + page_url="page_url", path="/samples/subresource-integrity/", scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", url="https://example.com/?hello", @@ -120,7 +120,7 @@ async def test_method_scan_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.with_raw_response.scan( - "string", + account_id="accountId", ) assert response.is_closed is True @@ -131,7 +131,7 @@ async def test_raw_response_scan(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.with_streaming_response.scan( - "string", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,5 +145,5 @@ async def test_streaming_response_scan(self, async_client: AsyncCloudflare) -> N async def test_path_params_scan(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.with_raw_response.scan( - "", + account_id="", ) diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 9eb37b948c4..14af34401f7 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -119,7 +119,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -131,7 +131,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -173,7 +173,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -189,7 +189,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -208,7 +208,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -218,7 +218,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -276,7 +276,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) @@ -284,7 +284,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -296,7 +296,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -311,20 +311,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.delete( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -336,7 +336,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -378,7 +378,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -394,7 +394,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -413,7 +413,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -423,7 +423,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.edit( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -434,7 +434,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @@ -442,7 +442,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -454,7 +454,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -469,13 +469,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -581,7 +581,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -593,7 +593,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -635,7 +635,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -651,7 +651,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -670,7 +670,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -680,7 +680,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -738,7 +738,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoomDeleteResponse, waiting_room, path=["response"]) @@ -746,7 +746,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -758,7 +758,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -773,20 +773,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.delete( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.delete( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -798,7 +798,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -840,7 +840,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -856,7 +856,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -875,7 +875,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.edit( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", host="shop.example.com", name="production_webinar", @@ -885,7 +885,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.edit( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", host="shop.example.com", name="production_webinar", @@ -896,7 +896,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @@ -904,7 +904,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -916,7 +916,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -931,12 +931,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/test_warp_connector.py b/tests/api_resources/test_warp_connector.py index 7db50a0d321..77d3b889c82 100644 --- a/tests/api_resources/test_warp_connector.py +++ b/tests/api_resources/test_warp_connector.py @@ -127,7 +127,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) @@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -147,7 +147,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -162,20 +162,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) @@ -183,7 +183,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -193,7 +193,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -205,7 +205,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -220,20 +220,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) @@ -241,7 +241,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -253,7 +253,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -268,20 +268,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_token(self, client: Cloudflare) -> None: warp_connector = client.warp_connector.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) @@ -289,7 +289,7 @@ def test_method_token(self, client: Cloudflare) -> None: @parametrize def test_raw_response_token(self, client: Cloudflare) -> None: response = client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -301,7 +301,7 @@ def test_raw_response_token(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_token(self, client: Cloudflare) -> None: with client.warp_connector.with_streaming_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -316,13 +316,13 @@ def test_streaming_response_token(self, client: Cloudflare) -> None: def test_path_params_token(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.warp_connector.with_raw_response.token( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -433,7 +433,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorDeleteResponse, warp_connector, path=["response"]) @@ -441,7 +441,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -453,7 +453,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -468,20 +468,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.warp_connector.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorEditResponse, warp_connector, path=["response"]) @@ -489,7 +489,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -499,7 +499,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -511,7 +511,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -526,20 +526,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.warp_connector.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorGetResponse, warp_connector, path=["response"]) @@ -547,7 +547,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -559,7 +559,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -574,20 +574,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.warp_connector.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_token(self, async_client: AsyncCloudflare) -> None: warp_connector = await async_client.warp_connector.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(WARPConnectorTokenResponse, warp_connector, path=["response"]) @@ -595,7 +595,7 @@ async def test_method_token(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_token(self, async_client: AsyncCloudflare) -> None: response = await async_client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -607,7 +607,7 @@ async def test_raw_response_token(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_token(self, async_client: AsyncCloudflare) -> None: async with async_client.warp_connector.with_streaming_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -622,12 +622,12 @@ async def test_streaming_response_token(self, async_client: AsyncCloudflare) -> async def test_path_params_token(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.warp_connector.with_raw_response.token( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.warp_connector.with_raw_response.token( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/test_zones.py b/tests/api_resources/test_zones.py index f4a3a4dfb67..c66ce174c90 100644 --- a/tests/api_resources/test_zones.py +++ b/tests/api_resources/test_zones.py @@ -73,12 +73,12 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: zone = client.zones.list( account={ - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, direction="desc", match="any", - name="string", + name="name", order="status", page=1, per_page=5, @@ -290,12 +290,12 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: zone = await async_client.zones.list( account={ - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, direction="desc", match="any", - name="string", + name="name", order="status", page=1, per_page=5, diff --git a/tests/api_resources/url_scanner/test_scans.py b/tests/api_resources/url_scanner/test_scans.py index 8a33a5f10ce..371efa725c5 100644 --- a/tests/api_resources/url_scanner/test_scans.py +++ b/tests/api_resources/url_scanner/test_scans.py @@ -32,7 +32,7 @@ class TestScans: @parametrize def test_method_create(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) @@ -40,7 +40,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", custom_headers={"foo": "string"}, screenshots_resolutions=["desktop", "mobile", "tablet"], @@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) @@ -63,7 +63,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) as response: assert not response.is_closed @@ -78,23 +78,23 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.scans.with_raw_response.create( - "", + account_id="", url="https://www.example.com", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert_matches_type(ScanGetResponse, scan, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", full=True, ) assert_matches_type(ScanGetResponse, scan, path=["response"]) @@ -102,8 +102,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -114,8 +114,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,29 +129,29 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): client.url_scanner.scans.with_raw_response.get( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize def test_method_har(self, client: Cloudflare) -> None: scan = client.url_scanner.scans.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert_matches_type(ScanHarResponse, scan, path=["response"]) @parametrize def test_raw_response_har(self, client: Cloudflare) -> None: response = client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -162,8 +162,8 @@ def test_raw_response_har(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_har(self, client: Cloudflare) -> None: with client.url_scanner.scans.with_streaming_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,25 +177,25 @@ def test_streaming_response_har(self, client: Cloudflare) -> None: def test_path_params_har(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): client.url_scanner.scans.with_raw_response.har( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize @pytest.mark.respx(base_url=base_url) def test_method_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed assert scan.json() == {"foo": "bar"} @@ -205,12 +205,12 @@ def test_method_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> @parametrize @pytest.mark.respx(base_url=base_url) def test_method_screenshot_with_all_params(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", resolution="desktop", ) assert scan.is_closed @@ -221,13 +221,13 @@ def test_method_screenshot_with_all_params(self, client: Cloudflare, respx_mock: @parametrize @pytest.mark.respx(base_url=base_url) def test_raw_response_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed is True @@ -238,12 +238,12 @@ def test_raw_response_screenshot(self, client: Cloudflare, respx_mock: MockRoute @parametrize @pytest.mark.respx(base_url=base_url) def test_streaming_response_screenshot(self, client: Cloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.url_scanner.scans.with_streaming_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as scan: assert not scan.is_closed assert scan.http_request.headers.get("X-Stainless-Lang") == "python" @@ -259,14 +259,14 @@ def test_streaming_response_screenshot(self, client: Cloudflare, respx_mock: Moc def test_path_params_screenshot(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): client.url_scanner.scans.with_raw_response.screenshot( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @@ -276,7 +276,7 @@ class TestAsyncScans: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", ) assert_matches_type(ScanCreateResponse, scan, path=["response"]) @@ -284,7 +284,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.create( - "string", + account_id="accountId", url="https://www.example.com", custom_headers={"foo": "string"}, screenshots_resolutions=["desktop", "mobile", "tablet"], @@ -295,7 +295,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) @@ -307,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.create( - "string", + account_id="accountId", url="https://www.example.com", ) as response: assert not response.is_closed @@ -322,23 +322,23 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.create( - "", + account_id="", url="https://www.example.com", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert_matches_type(ScanGetResponse, scan, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", full=True, ) assert_matches_type(ScanGetResponse, scan, path=["response"]) @@ -346,8 +346,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -358,8 +358,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,29 +373,29 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.get( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize async def test_method_har(self, async_client: AsyncCloudflare) -> None: scan = await async_client.url_scanner.scans.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert_matches_type(ScanHarResponse, scan, path=["response"]) @parametrize async def test_raw_response_har(self, async_client: AsyncCloudflare) -> None: response = await async_client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert response.is_closed is True @@ -406,8 +406,8 @@ async def test_raw_response_har(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_har(self, async_client: AsyncCloudflare) -> None: async with async_client.url_scanner.scans.with_streaming_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -421,25 +421,25 @@ async def test_streaming_response_har(self, async_client: AsyncCloudflare) -> No async def test_path_params_har(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.har( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.har( - "", - account_id="string", + scan_id="", + account_id="accountId", ) @parametrize @pytest.mark.respx(base_url=base_url) async def test_method_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = await async_client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed assert await scan.json() == {"foo": "bar"} @@ -451,12 +451,12 @@ async def test_method_screenshot(self, async_client: AsyncCloudflare, respx_mock async def test_method_screenshot_with_all_params( self, async_client: AsyncCloudflare, respx_mock: MockRouter ) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = await async_client.url_scanner.scans.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", resolution="desktop", ) assert scan.is_closed @@ -467,13 +467,13 @@ async def test_method_screenshot_with_all_params( @parametrize @pytest.mark.respx(base_url=base_url) async def test_raw_response_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) scan = await async_client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) assert scan.is_closed is True @@ -484,12 +484,12 @@ async def test_raw_response_screenshot(self, async_client: AsyncCloudflare, resp @parametrize @pytest.mark.respx(base_url=base_url) async def test_streaming_response_screenshot(self, async_client: AsyncCloudflare, respx_mock: MockRouter) -> None: - respx_mock.get("/accounts/string/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( + respx_mock.get("/accounts/accountId/urlscanner/scan/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/screenshot").mock( return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.url_scanner.scans.with_streaming_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="accountId", ) as scan: assert not scan.is_closed assert scan.http_request.headers.get("X-Stainless-Lang") == "python" @@ -505,12 +505,12 @@ async def test_streaming_response_screenshot(self, async_client: AsyncCloudflare async def test_path_params_screenshot(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.screenshot( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + scan_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `scan_id` but received ''"): await async_client.url_scanner.scans.with_raw_response.screenshot( - "", - account_id="string", + scan_id="", + account_id="accountId", ) diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py index a428b30e8f9..9e47db517e9 100644 --- a/tests/api_resources/user/test_invites.py +++ b/tests/api_resources/user/test_invites.py @@ -46,7 +46,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: invite = client.user.invites.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) assert_matches_type(object, invite, path=["response"]) @@ -54,7 +54,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.invites.with_raw_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) @@ -66,7 +66,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.invites.with_streaming_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) as response: assert not response.is_closed @@ -81,7 +81,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): client.user.invites.with_raw_response.edit( - "", + invite_id="", status="accepted", ) @@ -155,7 +155,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: invite = await async_client.user.invites.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) assert_matches_type(object, invite, path=["response"]) @@ -163,7 +163,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.invites.with_raw_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) @@ -175,7 +175,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.invites.with_streaming_response.edit( - "4f5f0c14a2a41d5063dd301b2f829f04", + invite_id="4f5f0c14a2a41d5063dd301b2f829f04", status="accepted", ) as response: assert not response.is_closed @@ -190,7 +190,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `invite_id` but received ''"): await async_client.user.invites.with_raw_response.edit( - "", + invite_id="", status="accepted", ) diff --git a/tests/api_resources/user/test_subscriptions.py b/tests/api_resources/user/test_subscriptions.py index 95133505c93..c109797de83 100644 --- a/tests/api_resources/user/test_subscriptions.py +++ b/tests/api_resources/user/test_subscriptions.py @@ -25,15 +25,15 @@ class TestSubscriptions: @parametrize def test_method_update(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -71,7 +71,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -82,7 +82,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,7 +96,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.user.subscriptions.with_raw_response.update( - "", + identifier="", ) @parametrize @@ -140,15 +140,15 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: subscription = client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -186,7 +186,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.user.subscriptions.with_raw_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -197,7 +197,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.user.subscriptions.with_streaming_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -211,7 +211,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.user.subscriptions.with_raw_response.edit( - "", + identifier="", ) @parametrize @@ -246,15 +246,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionUpdateResponse, subscription, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.update( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -292,7 +292,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -303,7 +303,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.update( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,7 +317,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.user.subscriptions.with_raw_response.update( - "", + identifier="", ) @parametrize @@ -361,15 +361,15 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionEditResponse, subscription, path=["response"]) @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.user.subscriptions.edit( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -407,7 +407,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.subscriptions.with_raw_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -418,7 +418,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.user.subscriptions.with_streaming_response.edit( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -432,7 +432,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.user.subscriptions.with_raw_response.edit( - "", + identifier="", ) @parametrize diff --git a/tests/api_resources/user/test_tokens.py b/tests/api_resources/user/test_tokens.py index 84f1a588242..cf66f8daf04 100644 --- a/tests/api_resources/user/test_tokens.py +++ b/tests/api_resources/user/test_tokens.py @@ -220,7 +220,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: token = client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -256,7 +256,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: token = client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -339,7 +339,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.tokens.with_raw_response.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -379,7 +379,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.tokens.with_streaming_response.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -739,7 +739,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -775,7 +775,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: token = await async_client.user.tokens.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -858,7 +858,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.with_raw_response.update( - {}, + token_id={}, name="readonly token", policies=[ { @@ -898,7 +898,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.with_streaming_response.update( - {}, + token_id={}, name="readonly token", policies=[ { diff --git a/tests/api_resources/user/tokens/test_value.py b/tests/api_resources/user/tokens/test_value.py index d4ef302b8e1..9eba90baaa8 100644 --- a/tests/api_resources/user/tokens/test_value.py +++ b/tests/api_resources/user/tokens/test_value.py @@ -19,7 +19,7 @@ class TestValue: @parametrize def test_method_update(self, client: Cloudflare) -> None: value = client.user.tokens.value.update( - {}, + token_id={}, body={}, ) assert_matches_type(str, value, path=["response"]) @@ -27,7 +27,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.user.tokens.value.with_raw_response.update( - {}, + token_id={}, body={}, ) @@ -39,7 +39,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.user.tokens.value.with_streaming_response.update( - {}, + token_id={}, body={}, ) as response: assert not response.is_closed @@ -57,7 +57,7 @@ class TestAsyncValue: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: value = await async_client.user.tokens.value.update( - {}, + token_id={}, body={}, ) assert_matches_type(str, value, path=["response"]) @@ -65,7 +65,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.user.tokens.value.with_raw_response.update( - {}, + token_id={}, body={}, ) @@ -77,7 +77,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.user.tokens.value.with_streaming_response.update( - {}, + token_id={}, body={}, ) as response: assert not response.is_closed diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py index a4873ac1510..c24b21b2d96 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -99,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: index = client.vectorize.indexes.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -121,7 +121,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) as response: @@ -137,14 +137,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="", description="This is my example index.", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.update( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -190,7 +190,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IndexDeleteResponse, index, path=["response"]) @@ -198,7 +198,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -210,7 +210,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -225,20 +225,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.delete( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete_by_ids(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) @@ -246,7 +246,7 @@ def test_method_delete_by_ids(self, client: Cloudflare) -> None: @parametrize def test_method_delete_by_ids_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -255,7 +255,7 @@ def test_method_delete_by_ids_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete_by_ids(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -267,7 +267,7 @@ def test_raw_response_delete_by_ids(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete_by_ids(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -282,20 +282,20 @@ def test_streaming_response_delete_by_ids(self, client: Cloudflare) -> None: def test_path_params_delete_by_ids(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.delete_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) @@ -303,7 +303,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -315,7 +315,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -330,20 +330,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.get( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get_by_ids(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, index, path=["response"]) @@ -351,7 +351,7 @@ def test_method_get_by_ids(self, client: Cloudflare) -> None: @parametrize def test_method_get_by_ids_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -360,7 +360,7 @@ def test_method_get_by_ids_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get_by_ids(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -372,7 +372,7 @@ def test_raw_response_get_by_ids(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get_by_ids(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -387,13 +387,13 @@ def test_streaming_response_get_by_ids(self, client: Cloudflare) -> None: def test_path_params_get_by_ids(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.get_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -401,7 +401,7 @@ def test_path_params_get_by_ids(self, client: Cloudflare) -> None: @parametrize def test_method_insert(self, client: Cloudflare) -> None: index = client.vectorize.indexes.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -411,7 +411,7 @@ def test_method_insert(self, client: Cloudflare) -> None: @parametrize def test_raw_response_insert(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -425,7 +425,7 @@ def test_raw_response_insert(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_insert(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -442,14 +442,14 @@ def test_streaming_response_insert(self, client: Cloudflare) -> None: def test_path_params_insert(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.insert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -457,7 +457,7 @@ def test_path_params_insert(self, client: Cloudflare) -> None: @parametrize def test_method_query(self, client: Cloudflare) -> None: index = client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -466,7 +466,7 @@ def test_method_query(self, client: Cloudflare) -> None: @parametrize def test_method_query_with_all_params(self, client: Cloudflare) -> None: index = client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], filter={ @@ -482,7 +482,7 @@ def test_method_query_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_query(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -495,7 +495,7 @@ def test_raw_response_query(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_query(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) as response: @@ -511,14 +511,14 @@ def test_streaming_response_query(self, client: Cloudflare) -> None: def test_path_params_query(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="", vector=[0.5, 0.5, 0.5], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.query( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -527,7 +527,7 @@ def test_path_params_query(self, client: Cloudflare) -> None: @parametrize def test_method_upsert(self, client: Cloudflare) -> None: index = client.vectorize.indexes.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -537,7 +537,7 @@ def test_method_upsert(self, client: Cloudflare) -> None: @parametrize def test_raw_response_upsert(self, client: Cloudflare) -> None: response = client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -551,7 +551,7 @@ def test_raw_response_upsert(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_upsert(self, client: Cloudflare) -> None: with client.vectorize.indexes.with_streaming_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -568,14 +568,14 @@ def test_streaming_response_upsert(self, client: Cloudflare) -> None: def test_path_params_upsert(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): client.vectorize.indexes.with_raw_response.upsert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -658,7 +658,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -667,7 +667,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -680,7 +680,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.update( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) as response: @@ -696,14 +696,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.update( - "example-index", + index_name="example-index", account_id="", description="This is my example index.", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.update( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", description="This is my example index.", ) @@ -749,7 +749,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(IndexDeleteResponse, index, path=["response"]) @@ -757,7 +757,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -769,7 +769,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.delete( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -784,20 +784,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete_by_ids(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[IndexDeleteVectorsByID], index, path=["response"]) @@ -805,7 +805,7 @@ async def test_method_delete_by_ids(self, async_client: AsyncCloudflare) -> None @parametrize async def test_method_delete_by_ids_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -814,7 +814,7 @@ async def test_method_delete_by_ids_with_all_params(self, async_client: AsyncClo @parametrize async def test_raw_response_delete_by_ids(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -826,7 +826,7 @@ async def test_raw_response_delete_by_ids(self, async_client: AsyncCloudflare) - @parametrize async def test_streaming_response_delete_by_ids(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -841,20 +841,20 @@ async def test_streaming_response_delete_by_ids(self, async_client: AsyncCloudfl async def test_path_params_delete_by_ids(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.delete_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CreateIndex], index, path=["response"]) @@ -862,7 +862,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -874,7 +874,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.get( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -889,20 +889,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.get( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.get( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get_by_ids(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, index, path=["response"]) @@ -910,7 +910,7 @@ async def test_method_get_by_ids(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_by_ids_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ids=["5121db81354a40c6aedc3fe1ace51c59", "f90eb49c2107486abdfd78c67e853430"], ) @@ -919,7 +919,7 @@ async def test_method_get_by_ids_with_all_params(self, async_client: AsyncCloudf @parametrize async def test_raw_response_get_by_ids(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -931,7 +931,7 @@ async def test_raw_response_get_by_ids(self, async_client: AsyncCloudflare) -> N @parametrize async def test_streaming_response_get_by_ids(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.get_by_ids( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -946,13 +946,13 @@ async def test_streaming_response_get_by_ids(self, async_client: AsyncCloudflare async def test_path_params_get_by_ids(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.get_by_ids( - "example-index", + index_name="example-index", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.get_by_ids( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -960,7 +960,7 @@ async def test_path_params_get_by_ids(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_insert(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -970,7 +970,7 @@ async def test_method_insert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_insert(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -984,7 +984,7 @@ async def test_raw_response_insert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_insert(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.insert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -1001,14 +1001,14 @@ async def test_streaming_response_insert(self, async_client: AsyncCloudflare) -> async def test_path_params_insert(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.insert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.insert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -1016,7 +1016,7 @@ async def test_path_params_insert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_query(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -1025,7 +1025,7 @@ async def test_method_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], filter={ @@ -1041,7 +1041,7 @@ async def test_method_query_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -1054,7 +1054,7 @@ async def test_raw_response_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.query( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) as response: @@ -1070,14 +1070,14 @@ async def test_streaming_response_query(self, async_client: AsyncCloudflare) -> async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.query( - "example-index", + index_name="example-index", account_id="", vector=[0.5, 0.5, 0.5], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.query( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", vector=[0.5, 0.5, 0.5], ) @@ -1086,7 +1086,7 @@ async def test_path_params_query(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_upsert(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -1096,7 +1096,7 @@ async def test_method_upsert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_upsert(self, async_client: AsyncCloudflare) -> None: response = await async_client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) @@ -1110,7 +1110,7 @@ async def test_raw_response_upsert(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_upsert(self, async_client: AsyncCloudflare) -> None: async with async_client.vectorize.indexes.with_streaming_response.upsert( - "example-index", + index_name="example-index", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) as response: @@ -1127,14 +1127,14 @@ async def test_streaming_response_upsert(self, async_client: AsyncCloudflare) -> async def test_path_params_upsert(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.vectorize.indexes.with_raw_response.upsert( - "example-index", + index_name="example-index", account_id="", body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `index_name` but received ''"): await async_client.vectorize.indexes.with_raw_response.upsert( - "", + index_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body=b"raw file contents", ) diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py index 3a81dca45f9..c164f78f6b8 100644 --- a/tests/api_resources/waiting_rooms/events/test_details.py +++ b/tests/api_resources/waiting_rooms/events/test_details.py @@ -20,7 +20,7 @@ class TestDetails: @parametrize def test_method_get(self, client: Cloudflare) -> None: detail = client.waiting_rooms.events.details.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.events.details.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.details.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -84,7 +84,7 @@ class TestAsyncDetails: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: detail = await async_client.waiting_rooms.events.details.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -106,7 +106,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.details.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -122,21 +122,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.details.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.details.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index 2be3b4b028c..b416ff77d57 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -24,7 +24,7 @@ class TestEvents: @parametrize def test_method_create(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -71,7 +71,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -89,7 +89,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -98,7 +98,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -108,7 +108,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -120,7 +120,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -142,7 +142,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -158,7 +158,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -177,7 +177,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -187,7 +187,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -197,7 +197,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.update( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -208,7 +208,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[Event], event, path=["response"]) @@ -216,7 +216,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page={}, per_page={}, @@ -226,7 +226,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -253,20 +253,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -275,7 +275,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -288,7 +288,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -304,21 +304,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.delete( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -326,7 +326,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -338,7 +338,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -360,7 +360,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -376,7 +376,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -395,7 +395,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -405,7 +405,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -415,7 +415,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.edit( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -426,7 +426,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: event = client.waiting_rooms.events.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -435,7 +435,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -448,7 +448,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.events.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -464,21 +464,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): client.waiting_rooms.events.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -490,7 +490,7 @@ class TestAsyncEvents: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -501,7 +501,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -522,7 +522,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -537,7 +537,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -555,7 +555,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -564,7 +564,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", event_end_time="2021-09-28T17:00:00.000Z", event_start_time="2021-09-28T15:30:00.000Z", @@ -574,7 +574,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -586,7 +586,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -608,7 +608,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -624,7 +624,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -643,7 +643,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -653,7 +653,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.update( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -663,7 +663,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.update( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -674,7 +674,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[Event], event, path=["response"]) @@ -682,7 +682,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", page={}, per_page={}, @@ -692,7 +692,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -704,7 +704,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -719,20 +719,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -741,7 +741,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -754,7 +754,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -770,21 +770,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.delete( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -792,7 +792,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -804,7 +804,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -826,7 +826,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -842,7 +842,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -861,7 +861,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -871,7 +871,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", event_end_time="2021-09-28T17:00:00.000Z", @@ -881,7 +881,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.edit( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", event_end_time="2021-09-28T17:00:00.000Z", @@ -892,7 +892,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: event = await async_client.waiting_rooms.events.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -901,7 +901,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -914,7 +914,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.events.with_streaming_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -930,21 +930,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.get( - "25756b2dfe6e378a06b033b670413757", + event_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): await async_client.waiting_rooms.events.with_raw_response.get( - "", + event_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py index 0716bb86c5d..cb79bc2716b 100644 --- a/tests/api_resources/waiting_rooms/test_rules.py +++ b/tests/api_resources/waiting_rooms/test_rules.py @@ -27,7 +27,7 @@ class TestRules: @parametrize def test_method_create(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -37,7 +37,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -49,7 +49,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -63,7 +63,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -80,7 +80,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -88,7 +88,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -97,7 +97,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -119,7 +119,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -145,7 +145,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -174,7 +174,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", body=[ { @@ -194,7 +194,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -215,7 +215,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"]) @@ -223,7 +223,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -235,7 +235,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -250,20 +250,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -272,7 +272,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -285,7 +285,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -301,21 +301,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.waiting_rooms.rules.with_raw_response.delete( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -323,7 +323,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -334,7 +334,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: rule = client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -348,7 +348,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -363,7 +363,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.waiting_rooms.rules.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -381,7 +381,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -390,7 +390,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", action="bypass_waiting_room", @@ -399,7 +399,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.waiting_rooms.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -413,7 +413,7 @@ class TestAsyncRules: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -423,7 +423,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -435,7 +435,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -449,7 +449,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -466,7 +466,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.create( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -474,7 +474,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.create( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", action="bypass_waiting_room", expression="ip.src in {10.20.30.40}", @@ -483,7 +483,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -505,7 +505,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -531,7 +531,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -560,7 +560,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.update( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", body=[ { @@ -580,7 +580,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.update( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", body=[ { @@ -601,7 +601,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"]) @@ -609,7 +609,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -621,7 +621,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -636,20 +636,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.list( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.list( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -658,7 +658,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -671,7 +671,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) as response: @@ -687,21 +687,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.delete( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.delete( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) @@ -709,7 +709,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -720,7 +720,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.waiting_rooms.rules.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -734,7 +734,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -749,7 +749,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.rules.with_streaming_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -767,7 +767,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", @@ -776,7 +776,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.edit( - "25756b2dfe6e378a06b033b670413757", + rule_id="25756b2dfe6e378a06b033b670413757", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="", action="bypass_waiting_room", @@ -785,7 +785,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.waiting_rooms.rules.with_raw_response.edit( - "", + rule_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", action="bypass_waiting_room", diff --git a/tests/api_resources/waiting_rooms/test_statuses.py b/tests/api_resources/waiting_rooms/test_statuses.py index 9a7ff6731a5..5ca8f12dbec 100644 --- a/tests/api_resources/waiting_rooms/test_statuses.py +++ b/tests/api_resources/waiting_rooms/test_statuses.py @@ -20,7 +20,7 @@ class TestStatuses: @parametrize def test_method_get(self, client: Cloudflare) -> None: status = client.waiting_rooms.statuses.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(StatusGetResponse, status, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.waiting_rooms.statuses.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): client.waiting_rooms.statuses.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncStatuses: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: status = await async_client.waiting_rooms.statuses.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(StatusGetResponse, status, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.waiting_rooms.statuses.with_streaming_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.waiting_rooms.statuses.with_raw_response.get( - "699d98642c564d2e855e9661899b7252", + waiting_room_id="699d98642c564d2e855e9661899b7252", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `waiting_room_id` but received ''"): await async_client.waiting_rooms.statuses.with_raw_response.get( - "", + waiting_room_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py index d5891151684..af0aba72b11 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py @@ -26,7 +26,7 @@ class TestEntries: @parametrize def test_method_create(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -61,7 +61,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -78,7 +78,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -86,7 +86,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -95,7 +95,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -106,7 +106,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -133,7 +133,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -151,7 +151,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -160,7 +160,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -171,7 +171,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -181,7 +181,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) @@ -189,7 +189,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -201,7 +201,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -216,20 +216,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -251,7 +251,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -267,14 +267,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -283,7 +283,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -291,7 +291,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: entry = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -300,7 +300,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -313,7 +313,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -329,14 +329,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -345,7 +345,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -357,7 +357,7 @@ class TestAsyncEntries: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -367,7 +367,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -379,7 +379,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -394,7 +394,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -411,7 +411,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -419,7 +419,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.create( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", @@ -428,7 +428,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -439,7 +439,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -452,7 +452,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -468,7 +468,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -486,7 +486,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -495,7 +495,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -506,7 +506,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.update( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", @@ -516,7 +516,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[EntryListResponse], entry, path=["response"]) @@ -524,7 +524,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -536,7 +536,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -551,20 +551,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.list( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -574,7 +574,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -588,7 +588,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -604,14 +604,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -620,7 +620,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.delete( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -628,7 +628,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: entry = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -637,7 +637,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -650,7 +650,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: @@ -666,14 +666,14 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + content_list_entry_identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="", ) @@ -682,7 +682,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: ValueError, match=r"Expected a non-empty value for `content_list_entry_identifier` but received ''" ): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.entries.with_raw_response.get( - "", + content_list_entry_identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py index 9c682cddb81..1721a0e5ffe 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py @@ -20,7 +20,7 @@ class TestContentLists: @parametrize def test_method_update(self, client: Cloudflare) -> None: content_list = client.web3.hostnames.ipfs_universal_paths.content_lists.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -44,7 +44,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -61,7 +61,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", action="block", entries=[{}, {}, {}], @@ -69,7 +69,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -78,7 +78,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: content_list = client.web3.hostnames.ipfs_universal_paths.content_lists.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ContentList, content_list, path=["response"]) @@ -86,7 +86,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -98,7 +98,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -113,13 +113,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -130,7 +130,7 @@ class TestAsyncContentLists: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content_list = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -140,7 +140,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -154,7 +154,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -171,7 +171,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", action="block", entries=[{}, {}, {}], @@ -179,7 +179,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.update( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", action="block", entries=[{}, {}, {}], @@ -188,7 +188,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: content_list = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ContentList, content_list, path=["response"]) @@ -196,7 +196,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -208,7 +208,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -223,12 +223,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.ipfs_universal_paths.content_lists.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index d12712ea809..563cd35edd3 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -21,7 +21,7 @@ class TestHostnames: @parametrize def test_method_create(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) as response: assert not response.is_closed @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.create( - "", + zone_identifier="", target="ipfs", ) @@ -111,7 +111,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) @@ -119,7 +119,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -131,7 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -146,20 +146,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.delete( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -167,7 +167,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -177,7 +177,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -189,7 +189,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -204,20 +204,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.edit( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -225,7 +225,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -237,7 +237,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.web3.hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -252,13 +252,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.web3.hostnames.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -269,7 +269,7 @@ class TestAsyncHostnames: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -277,7 +277,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -287,7 +287,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) @@ -299,7 +299,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.create( - "023e105f4ecef8ad9ca31a8372d0c353", + zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) as response: assert not response.is_closed @@ -314,7 +314,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.create( - "", + zone_identifier="", target="ipfs", ) @@ -359,7 +359,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[HostnameDeleteResponse], hostname, path=["response"]) @@ -367,7 +367,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -379,7 +379,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -394,20 +394,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.delete( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -415,7 +415,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", @@ -425,7 +425,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -437,7 +437,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -452,20 +452,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.edit( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.edit( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Hostname, hostname, path=["response"]) @@ -473,7 +473,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -485,7 +485,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.web3.hostnames.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -500,12 +500,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + identifier="023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.web3.hostnames.with_raw_response.get( - "", + identifier="", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/ai/models/test_schema.py b/tests/api_resources/workers/ai/models/test_schema.py index 5937cee8a64..a815dc1f7c1 100644 --- a/tests/api_resources/workers/ai/models/test_schema.py +++ b/tests/api_resources/workers/ai/models/test_schema.py @@ -20,7 +20,7 @@ class TestSchema: def test_method_get(self, client: Cloudflare) -> None: schema = client.workers.ai.models.schema.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert_matches_type(object, schema, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.ai.models.schema.with_raw_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.ai.models.schema.with_streaming_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -55,7 +55,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.models.schema.with_raw_response.get( account_id="", - model="string", + model="model", ) @@ -66,7 +66,7 @@ class TestAsyncSchema: async def test_method_get(self, async_client: AsyncCloudflare) -> None: schema = await async_client.workers.ai.models.schema.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert_matches_type(object, schema, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.models.schema.with_raw_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) assert response.is_closed is True @@ -86,7 +86,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.models.schema.with_streaming_response.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", - model="string", + model="model", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -101,5 +101,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.models.schema.with_raw_response.get( account_id="", - model="string", + model="model", ) diff --git a/tests/api_resources/workers/scripts/test_content.py b/tests/api_resources/workers/scripts/test_content.py index ade69104c00..1863b3a060b 100644 --- a/tests/api_resources/workers/scripts/test_content.py +++ b/tests/api_resources/workers/scripts/test_content.py @@ -29,7 +29,7 @@ class TestContent: @parametrize def test_method_update(self, client: Cloudflare) -> None: content = client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -38,15 +38,15 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: content = client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "body_part": "worker.js", "main_module": "worker.js", }, - cf_worker_body_part="string", - cf_worker_main_module_part="string", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -54,7 +54,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -67,7 +67,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -83,13 +83,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -116,7 +116,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.workers.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -149,13 +149,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -167,7 +167,7 @@ class TestAsyncContent: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -176,15 +176,15 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "body_part": "worker.js", "main_module": "worker.js", }, - cf_worker_body_part="string", - cf_worker_main_module_part="string", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -192,7 +192,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -205,7 +205,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -221,13 +221,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -238,7 +238,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert content.is_closed @@ -254,7 +254,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -270,7 +270,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/scripts/this-is_my_script-01/content/v2" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.workers.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as content: assert not content.is_closed @@ -287,12 +287,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_deployments.py b/tests/api_resources/workers/scripts/test_deployments.py index c49a56a7326..b5b08437d83 100644 --- a/tests/api_resources/workers/scripts/test_deployments.py +++ b/tests/api_resources/workers/scripts/test_deployments.py @@ -23,7 +23,7 @@ class TestDeployments: @parametrize def test_method_create(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @@ -31,17 +31,17 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", annotations={"workers_message": "Deploy bug fix."}, - strategy="string", + strategy="strategy", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -53,7 +53,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -68,20 +68,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.deployments.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: deployment = client.workers.scripts.deployments.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) @@ -89,7 +89,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -101,7 +101,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.deployments.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -116,13 +116,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.deployments.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -133,7 +133,7 @@ class TestAsyncDeployments: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @@ -141,17 +141,17 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", annotations={"workers_message": "Deploy bug fix."}, - strategy="string", + strategy="strategy", ) assert_matches_type(Optional[DeploymentCreateResponse], deployment, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -163,7 +163,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.deployments.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -178,20 +178,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: deployment = await async_client.workers.scripts.deployments.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[DeploymentGetResponse], deployment, path=["response"]) @@ -199,7 +199,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -211,7 +211,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.deployments.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -226,12 +226,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.deployments.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_schedules.py b/tests/api_resources/workers/scripts/test_schedules.py index 1e4fbf7a577..084b83eef92 100644 --- a/tests/api_resources/workers/scripts/test_schedules.py +++ b/tests/api_resources/workers/scripts/test_schedules.py @@ -20,7 +20,7 @@ class TestSchedules: @parametrize def test_method_update(self, client: Cloudflare) -> None: schedule = client.workers.scripts.schedules.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers.scripts.schedules.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body="[{'cron': '*/30 * * * *'}]", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.schedules.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: schedule = client.workers.scripts.schedules.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) @@ -81,7 +81,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.schedules.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,13 +108,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.schedules.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -125,7 +125,7 @@ class TestAsyncSchedules: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.workers.scripts.schedules.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.schedules.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) as response: @@ -163,14 +163,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body="[{'cron': '*/30 * * * *'}]", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body="[{'cron': '*/30 * * * *'}]", ) @@ -178,7 +178,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: schedule = await async_client.workers.scripts.schedules.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScheduleGetResponse], schedule, path=["response"]) @@ -186,7 +186,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -198,7 +198,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.schedules.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -213,12 +213,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.schedules.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_settings.py b/tests/api_resources/workers/scripts/test_settings.py index 2a599b792e3..cb3a6f85760 100644 --- a/tests/api_resources/workers/scripts/test_settings.py +++ b/tests/api_resources/workers/scripts/test_settings.py @@ -20,7 +20,7 @@ class TestSettings: @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -28,7 +28,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", logpush=False, tail_consumers=[ @@ -54,7 +54,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -66,7 +66,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.workers.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -81,20 +81,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.workers.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -102,7 +102,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -114,7 +114,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -129,13 +129,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -146,7 +146,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -154,7 +154,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", logpush=False, tail_consumers=[ @@ -180,7 +180,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -192,7 +192,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -207,20 +207,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ScriptSetting], setting, path=["response"]) @@ -228,7 +228,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -240,7 +240,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -255,12 +255,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_tail.py b/tests/api_resources/workers/scripts/test_tail.py index bfae28b968d..34740c57e6d 100644 --- a/tests/api_resources/workers/scripts/test_tail.py +++ b/tests/api_resources/workers/scripts/test_tail.py @@ -20,7 +20,7 @@ class TestTail: @parametrize def test_method_create(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.tail.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -73,7 +73,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -82,7 +82,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -95,7 +95,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -111,21 +111,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.workers.scripts.tail.with_raw_response.delete( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -133,7 +133,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: tail = client.workers.scripts.tail.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) @@ -141,7 +141,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -153,7 +153,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.tail.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -168,13 +168,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.tail.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -185,7 +185,7 @@ class TestAsyncTail: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -194,7 +194,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -207,7 +207,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -223,14 +223,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.tail.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.tail.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -238,7 +238,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -247,7 +247,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -260,7 +260,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -276,21 +276,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.tail.with_raw_response.delete( - "03dc9f77817b488fb26c5861ec18f791", + id="03dc9f77817b488fb26c5861ec18f791", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.workers.scripts.tail.with_raw_response.delete( - "", + id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -298,7 +298,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tail = await async_client.workers.scripts.tail.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TailGetResponse], tail, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -318,7 +318,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.tail.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -333,12 +333,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.tail.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.tail.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers/scripts/test_versions.py b/tests/api_resources/workers/scripts/test_versions.py index 1642da69882..4a0d47fbdc4 100644 --- a/tests/api_resources/workers/scripts/test_versions.py +++ b/tests/api_resources/workers/scripts/test_versions.py @@ -26,7 +26,7 @@ class TestVersions: @parametrize def test_method_create(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) @@ -35,13 +35,13 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "annotations": { "workers_message": "Fixed worker code.", - "workers_tag": "string", + "workers_tag": "workers/tag", }, "bindings": [ { @@ -63,7 +63,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -76,7 +76,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -92,20 +92,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.versions.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncV4PagePagination[VersionListResponse], version, path=["response"]) @@ -113,7 +113,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", deployable=True, page=0, @@ -124,7 +124,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -151,20 +151,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.versions.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: version = client.workers.scripts.versions.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -173,7 +173,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -186,7 +186,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.scripts.versions.with_streaming_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -202,21 +202,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `version_id` but received ''"): client.workers.scripts.versions.with_raw_response.get( - "", + version_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -229,7 +229,7 @@ class TestAsyncVersions: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[VersionCreateResponse], version, path=["response"]) @@ -238,13 +238,13 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], metadata={ "annotations": { "workers_message": "Fixed worker code.", - "workers_tag": "string", + "workers_tag": "workers/tag", }, "bindings": [ { @@ -266,7 +266,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -279,7 +279,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -295,20 +295,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.versions.with_raw_response.create( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.versions.with_raw_response.create( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncV4PagePagination[VersionListResponse], version, path=["response"]) @@ -316,7 +316,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", deployable=True, page=0, @@ -327,7 +327,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -339,7 +339,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -354,20 +354,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.versions.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.versions.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: version = await async_client.workers.scripts.versions.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -376,7 +376,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) @@ -389,7 +389,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.versions.with_streaming_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) as response: @@ -405,21 +405,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="", script_name="this-is_my_script-01", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.versions.with_raw_response.get( - "bcf48806-b317-4351-9ee7-36e7d557d4de", + version_id="bcf48806-b317-4351-9ee7-36e7d557d4de", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `version_id` but received ''"): await async_client.workers.scripts.versions.with_raw_response.get( - "", + version_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", script_name="this-is_my_script-01", ) diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index af717a3e838..aed9946b339 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -20,7 +20,7 @@ class TestAI: @parametrize def test_method_run_overload_1(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -29,7 +29,7 @@ def test_method_run_overload_1(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -42,7 +42,7 @@ def test_raw_response_run_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_run_overload_1(self, client: Cloudflare) -> None: def test_path_params_run_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -73,7 +73,7 @@ def test_path_params_run_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_2(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -82,7 +82,7 @@ def test_method_run_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -95,7 +95,7 @@ def test_raw_response_run_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -111,14 +111,14 @@ def test_streaming_response_run_overload_2(self, client: Cloudflare) -> None: def test_path_params_run_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -126,7 +126,7 @@ def test_path_params_run_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -135,7 +135,7 @@ def test_method_run_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, @@ -151,7 +151,7 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None @parametrize def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -164,7 +164,7 @@ def test_raw_response_run_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) as response: @@ -180,14 +180,14 @@ def test_streaming_response_run_overload_3(self, client: Cloudflare) -> None: def test_path_params_run_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -195,7 +195,7 @@ def test_path_params_run_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_4(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -204,7 +204,7 @@ def test_method_run_overload_4(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -217,7 +217,7 @@ def test_raw_response_run_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -233,14 +233,14 @@ def test_streaming_response_run_overload_4(self, client: Cloudflare) -> None: def test_path_params_run_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -248,7 +248,7 @@ def test_path_params_run_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_5(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -257,7 +257,7 @@ def test_method_run_overload_5(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -270,7 +270,7 @@ def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) as response: @@ -286,14 +286,14 @@ def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: def test_path_params_run_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", audio=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -301,7 +301,7 @@ def test_path_params_run_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_6(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -310,7 +310,7 @@ def test_method_run_overload_6(self, client: Cloudflare) -> None: @parametrize def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -323,7 +323,7 @@ def test_raw_response_run_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -339,14 +339,14 @@ def test_streaming_response_run_overload_6(self, client: Cloudflare) -> None: def test_path_params_run_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -354,7 +354,7 @@ def test_path_params_run_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -362,7 +362,7 @@ def test_method_run_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -371,7 +371,7 @@ def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None @parametrize def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -383,7 +383,7 @@ def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -398,20 +398,20 @@ def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: def test_path_params_run_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_run_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -419,22 +419,22 @@ def test_method_run_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lora="string", + lora="lora", max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], prompt="x", @@ -446,7 +446,7 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None @parametrize def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -458,7 +458,7 @@ def test_raw_response_run_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -473,22 +473,22 @@ def test_streaming_response_run_overload_8(self, client: Cloudflare) -> None: def test_path_params_run_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_run_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -496,20 +496,20 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", - source_lang="string", + source_lang="source_lang", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @@ -521,9 +521,9 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) as response: assert not response.is_closed @@ -538,24 +538,24 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: def test_path_params_run_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", - target_lang="string", + target_lang="target_lang", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @parametrize def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -564,7 +564,7 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", max_length=0, @@ -574,7 +574,7 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non @parametrize def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -587,7 +587,7 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) as response: @@ -603,14 +603,14 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: def test_path_params_run_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", input_text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -618,7 +618,7 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -627,25 +627,25 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], - prompt="string", + prompt="prompt", raw=True, temperature=0, ) @@ -654,7 +654,7 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non @parametrize def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -667,7 +667,7 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -683,14 +683,14 @@ def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -702,7 +702,7 @@ class TestAsyncAI: @parametrize async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -711,7 +711,7 @@ async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -724,7 +724,7 @@ async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) as response: @@ -740,14 +740,14 @@ async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudf async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) @@ -755,7 +755,7 @@ async def test_path_params_run_overload_1(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -764,7 +764,7 @@ async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -777,7 +777,7 @@ async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -793,14 +793,14 @@ async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudf async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -808,7 +808,7 @@ async def test_path_params_run_overload_2(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -817,7 +817,7 @@ async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, @@ -833,7 +833,7 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl @parametrize async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -846,7 +846,7 @@ async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) as response: @@ -862,14 +862,14 @@ async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudf async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", ) @@ -877,7 +877,7 @@ async def test_path_params_run_overload_3(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -886,7 +886,7 @@ async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -899,7 +899,7 @@ async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) as response: @@ -915,14 +915,14 @@ async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudf async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", text="x", ) @@ -930,7 +930,7 @@ async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -939,7 +939,7 @@ async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -952,7 +952,7 @@ async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) as response: @@ -968,14 +968,14 @@ async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudf async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", audio=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", audio=[0, 0, 0], ) @@ -983,7 +983,7 @@ async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -992,7 +992,7 @@ async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1005,7 +1005,7 @@ async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -1021,14 +1021,14 @@ async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudf async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1036,7 +1036,7 @@ async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) - @parametrize async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1044,7 +1044,7 @@ async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1053,7 +1053,7 @@ async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCl @parametrize async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1065,7 +1065,7 @@ async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1080,20 +1080,20 @@ async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudf async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1101,22 +1101,22 @@ async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - lora="string", + lora="lora", max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], prompt="x", @@ -1128,7 +1128,7 @@ async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCl @parametrize async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -1140,7 +1140,7 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -1155,22 +1155,22 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -1178,20 +1178,20 @@ async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> Non @parametrize async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", - source_lang="string", + source_lang="source_lang", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @parametrize async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @@ -1203,9 +1203,9 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) as response: assert not response.is_closed @@ -1220,24 +1220,24 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", - target_lang="string", + target_lang="target_lang", text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", + target_lang="target_lang", text="x", ) @parametrize async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -1246,7 +1246,7 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", max_length=0, @@ -1256,7 +1256,7 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC @parametrize async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -1269,7 +1269,7 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) as response: @@ -1285,14 +1285,14 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", input_text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", input_text="x", ) @@ -1300,7 +1300,7 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1309,25 +1309,25 @@ async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> No @parametrize async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], max_tokens=0, messages=[ { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, { - "content": "string", - "role": "string", + "content": "content", + "role": "role", }, ], - prompt="string", + prompt="prompt", raw=True, temperature=0, ) @@ -1336,7 +1336,7 @@ async def test_method_run_with_all_params_overload_11(self, async_client: AsyncC @parametrize async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) @@ -1349,7 +1349,7 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( - "string", + model_name="model_name", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) as response: @@ -1365,14 +1365,14 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.ai.with_raw_response.run( - "string", + model_name="model_name", account_id="", image=[0, 0, 0], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( - "", + model_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", image=[0, 0, 0], ) diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py index 7de5c103792..1bbc559f8f8 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -125,7 +125,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: domain = client.workers.domains.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert domain is None @@ -133,7 +133,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -145,7 +145,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -160,20 +160,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): client.workers.domains.with_raw_response.delete( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: domain = client.workers.domains.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert_matches_type(Optional[Domain], domain, path=["response"]) @@ -181,7 +181,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -193,7 +193,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers.domains.with_streaming_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -208,13 +208,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): client.workers.domains.with_raw_response.get( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -329,7 +329,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert domain is None @@ -337,7 +337,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -349,7 +349,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -364,20 +364,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.domains.with_raw_response.delete( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): await async_client.workers.domains.with_raw_response.delete( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) assert_matches_type(Optional[Domain], domain, path=["response"]) @@ -385,7 +385,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) @@ -397,7 +397,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.domains.with_streaming_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="9a7806061c88ada191ed06f989cc3dac", ) as response: assert not response.is_closed @@ -412,12 +412,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.domains.with_raw_response.get( - "dbe10b4bc17c295377eabd600e1787fd", + domain_id="dbe10b4bc17c295377eabd600e1787fd", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `domain_id` but received ''"): await async_client.workers.domains.with_raw_response.get( - "", + domain_id="", account_id="9a7806061c88ada191ed06f989cc3dac", ) diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index 0bd3fc17497..219b9844363 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -30,7 +30,7 @@ class TestScripts: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -39,7 +39,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -64,33 +64,33 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -123,7 +123,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -136,7 +136,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -152,13 +152,13 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -166,7 +166,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -175,10 +175,10 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: script = client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - message="string", + message="message", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -186,7 +186,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -199,7 +199,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -215,13 +215,13 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -266,7 +266,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: script = client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script is None @@ -274,7 +274,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: script = client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", force=True, ) @@ -283,7 +283,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -295,7 +295,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -310,13 +310,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -327,7 +327,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: return_value=httpx.Response(200, json={"foo": "bar"}) ) script = client.workers.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script.is_closed @@ -343,7 +343,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ) script = client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -359,7 +359,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter return_value=httpx.Response(200, json={"foo": "bar"}) ) with client.workers.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as script: assert not script.is_closed @@ -376,13 +376,13 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -394,7 +394,7 @@ class TestAsyncScripts: @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -403,7 +403,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -428,33 +428,33 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -487,7 +487,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -500,7 +500,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -516,13 +516,13 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -530,7 +530,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -539,10 +539,10 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", rollback_to="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - message="string", + message="message", ) assert_matches_type(Optional[Script], script, path=["response"]) @@ -550,7 +550,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -563,7 +563,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -579,13 +579,13 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -630,7 +630,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script is None @@ -638,7 +638,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", force=True, ) @@ -647,7 +647,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -659,7 +659,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -674,13 +674,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -691,7 +691,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR return_value=httpx.Response(200, json={"foo": "bar"}) ) script = await async_client.workers.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert script.is_closed @@ -707,7 +707,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ) script = await async_client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -723,7 +723,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx return_value=httpx.Response(200, json={"foo": "bar"}) ) async with async_client.workers.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as script: assert not script.is_closed @@ -740,12 +740,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py index 29c42f700b9..90c53166d4d 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py @@ -20,7 +20,7 @@ class TestBindings: @parametrize def test_method_get(self, client: Cloudflare) -> None: binding = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -84,7 +84,7 @@ class TestAsyncBindings: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: binding = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -106,7 +106,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -122,21 +122,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py index cfbbc556765..f120ae9e897 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py @@ -29,7 +29,7 @@ class TestContent: @parametrize def test_method_update(self, client: Cloudflare) -> None: content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -39,7 +39,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -47,8 +47,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "body_part": "worker.js", "main_module": "worker.js", }, - cf_worker_body_part="string", - cf_worker_main_module_part="string", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -56,7 +56,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -70,7 +70,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -87,21 +87,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -113,7 +113,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None: "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers_for_platforms.dispatch.namespaces.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -130,7 +130,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -147,7 +147,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as content: @@ -165,21 +165,21 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -192,7 +192,7 @@ class TestAsyncContent: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -202,7 +202,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -210,8 +210,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "body_part": "worker.js", "main_module": "worker.js", }, - cf_worker_body_part="string", - cf_worker_main_module_part="string", + cf_worker_body_part="CF-WORKER-BODY-PART", + cf_worker_main_module_part="CF-WORKER-MAIN-MODULE-PART", ) assert_matches_type(Optional[Script], content, path=["response"]) @@ -220,7 +220,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -235,7 +235,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -252,21 +252,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -278,7 +278,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -295,7 +295,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock: ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -312,7 +312,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx "/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content" ).mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as content: @@ -330,21 +330,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py index d839e9074b8..a8d4a57e938 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_secrets.py @@ -24,7 +24,7 @@ class TestSecrets: @parametrize def test_method_update(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -33,7 +33,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", name="MY_SECRET", @@ -45,7 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -58,7 +58,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -74,21 +74,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -96,7 +96,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: secret = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -105,7 +105,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -118,7 +118,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -134,21 +134,21 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -160,7 +160,7 @@ class TestAsyncSecrets: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -169,7 +169,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", name="MY_SECRET", @@ -182,7 +182,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = ( await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -196,7 +196,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -212,21 +212,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -234,7 +234,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: secret = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -243,7 +243,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -256,7 +256,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -272,21 +272,21 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.secrets.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py index c96a0c83565..29d130ed83b 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py @@ -24,7 +24,7 @@ class TestSettings: @parametrize def test_method_edit(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -34,7 +34,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", settings={ @@ -54,33 +54,33 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -112,7 +112,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -126,7 +126,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -143,21 +143,21 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -165,7 +165,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -174,7 +174,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -187,7 +187,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -203,21 +203,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -230,7 +230,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -240,7 +240,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", settings={ @@ -260,33 +260,33 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -318,7 +318,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -332,7 +332,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -349,21 +349,21 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -371,7 +371,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -380,7 +380,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -393,7 +393,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -409,21 +409,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py index a72e6183c72..382d4d2b376 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_tags.py @@ -24,7 +24,7 @@ class TestTags: @parametrize def test_method_update(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -48,7 +48,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -65,7 +65,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -73,7 +73,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", body=["my-tag", "my-tag", "my-tag"], @@ -81,7 +81,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -90,7 +90,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -99,7 +99,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -112,7 +112,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -128,21 +128,21 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -150,7 +150,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tag = client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -160,7 +160,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -174,7 +174,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -191,7 +191,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -199,7 +199,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", script_name="this-is_my_script-01", @@ -207,7 +207,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="", @@ -215,7 +215,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "", + tag="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -228,7 +228,7 @@ class TestAsyncTags: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -238,7 +238,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -252,7 +252,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -269,7 +269,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -277,7 +277,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", body=["my-tag", "my-tag", "my-tag"], @@ -285,7 +285,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", body=["my-tag", "my-tag", "my-tag"], @@ -294,7 +294,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -303,7 +303,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -316,7 +316,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -332,21 +332,21 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.list( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -354,7 +354,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tag = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -364,7 +364,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -378,7 +378,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_streaming_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -395,7 +395,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", @@ -403,7 +403,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", script_name="this-is_my_script-01", @@ -411,7 +411,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "my-tag", + tag="my-tag", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="", @@ -419,7 +419,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.tags.with_raw_response.delete( - "", + tag="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", script_name="this-is_my_script-01", diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 13bbacf62f1..febd78c036e 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -24,7 +24,7 @@ class TestScripts: @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -34,7 +34,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -59,33 +59,33 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -118,7 +118,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -132,7 +132,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -149,21 +149,21 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -172,7 +172,7 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -182,10 +182,10 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - message="string", + message="message", ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) @@ -193,7 +193,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -207,7 +207,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -224,21 +224,21 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -246,7 +246,7 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -255,7 +255,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", force=True, @@ -265,7 +265,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -278,7 +278,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -294,21 +294,21 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -316,7 +316,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: script = client.workers_for_platforms.dispatch.namespaces.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -325,7 +325,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -338,7 +338,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -354,21 +354,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -381,7 +381,7 @@ class TestAsyncScripts: @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -391,7 +391,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", any_part_name=[b"raw file contents", b"raw file contents", b"raw file contents"], @@ -416,33 +416,33 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "new_classes": ["string", "string", "string"], "renamed_classes": [ { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, { - "from": "string", - "to": "string", + "from": "from", + "to": "to", }, ], "transferred_classes": [ { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, { - "from": "string", - "from_script": "string", - "to": "string", + "from": "from", + "from_script": "from_script", + "to": "to", }, ], }, @@ -475,7 +475,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -489,7 +489,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -506,21 +506,21 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -529,7 +529,7 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -539,10 +539,10 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", - message="string", + message="message", ) assert_matches_type(Optional[WorkersScript], script, path=["response"]) @@ -550,7 +550,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -564,7 +564,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -581,21 +581,21 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.update( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -603,7 +603,7 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -612,7 +612,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", force=True, @@ -622,7 +622,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -635,7 +635,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -651,21 +651,21 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.delete( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -673,7 +673,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -682,7 +682,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) @@ -695,7 +695,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.scripts.with_streaming_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) as response: @@ -711,21 +711,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="", dispatch_namespace="my-dispatch-namespace", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "this-is_my_script-01", + script_name="this-is_my_script-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.scripts.with_raw_response.get( - "", + script_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py index cecc0bdbcf4..df9749cb2e5 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py +++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py @@ -109,7 +109,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, namespace, path=["response"]) @@ -117,7 +117,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -129,7 +129,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -144,20 +144,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) @@ -165,7 +165,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -177,7 +177,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.workers_for_platforms.dispatch.namespaces.with_streaming_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -192,13 +192,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -293,7 +293,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(object, namespace, path=["response"]) @@ -301,7 +301,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -313,7 +313,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -328,20 +328,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.delete( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[NamespaceGetResponse], namespace, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -361,7 +361,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.workers_for_platforms.dispatch.namespaces.with_streaming_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -376,12 +376,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "my-dispatch-namespace", + dispatch_namespace="my-dispatch-namespace", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"): await async_client.workers_for_platforms.dispatch.namespaces.with_raw_response.get( - "", + dispatch_namespace="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py index d544d4b922b..4c7af3be6a5 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -22,8 +22,8 @@ class TestCAs: @parametrize def test_method_create(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -31,8 +31,8 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -40,8 +40,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -53,8 +53,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,27 +69,27 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) @@ -97,7 +97,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) @@ -105,7 +105,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -117,7 +117,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -137,15 +137,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -153,8 +153,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -162,8 +162,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -175,8 +175,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -191,28 +191,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -220,8 +220,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -229,8 +229,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -242,8 +242,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -258,20 +258,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -282,8 +282,8 @@ class TestAsyncCAs: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -291,8 +291,8 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -300,8 +300,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -313,8 +313,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -329,27 +329,27 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) @@ -357,7 +357,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) @@ -365,7 +365,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -377,7 +377,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -397,15 +397,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -413,8 +413,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -422,8 +422,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -435,8 +435,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -451,28 +451,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -480,8 +480,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -489,8 +489,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -502,8 +502,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.cas.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -518,18 +518,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.cas.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index 767aa03ea30..2e0b22b4680 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -28,7 +28,7 @@ class TestPolicies: @parametrize def test_method_create(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) @@ -44,7 +44,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -52,12 +52,12 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -88,7 +88,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -96,7 +96,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -108,7 +108,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -116,7 +116,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -131,7 +131,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.create( - "", + app_id="", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -139,12 +139,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -157,7 +157,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -165,14 +165,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -181,7 +181,7 @@ def test_method_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -189,7 +189,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -198,12 +198,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -234,7 +234,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -243,7 +243,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -255,7 +255,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -264,7 +264,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,7 +279,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", decision="allow", include=[ @@ -288,12 +288,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -302,12 +302,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -321,7 +321,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -330,15 +330,15 @@ def test_path_params_update(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(SyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -346,8 +346,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(SyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -355,8 +355,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -368,8 +368,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -384,29 +384,29 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -414,9 +414,9 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -424,9 +424,9 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -438,9 +438,9 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -455,39 +455,39 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -495,9 +495,9 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -505,9 +505,9 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -519,9 +519,9 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -536,30 +536,30 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) @@ -570,7 +570,7 @@ class TestAsyncPolicies: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -578,7 +578,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyCreateResponse], policy, path=["response"]) @@ -586,7 +586,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -594,12 +594,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -630,7 +630,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -638,7 +638,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -650,7 +650,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -658,7 +658,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -673,7 +673,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "", + app_id="", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -681,12 +681,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -699,7 +699,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ {"email": {"email": "test@example.com"}}, @@ -707,14 +707,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -723,7 +723,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyUpdateResponse], policy, path=["response"]) @@ -731,7 +731,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -740,12 +740,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", approval_groups=[ { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -776,7 +776,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -785,7 +785,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -797,7 +797,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -806,7 +806,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -821,7 +821,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", decision="allow", include=[ @@ -830,12 +830,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -844,12 +844,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -863,7 +863,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", decision="allow", include=[ @@ -872,15 +872,15 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -888,8 +888,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[PolicyListResponse], policy, path=["response"]) @@ -897,8 +897,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -910,8 +910,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -926,29 +926,29 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "", - account_id="string", + app_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -956,9 +956,9 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -966,9 +966,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -980,9 +980,9 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -997,39 +997,39 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -1037,9 +1037,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.applications.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -1047,9 +1047,9 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1061,9 +1061,9 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1078,28 +1078,28 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `app_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "", + policy_id="", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", app_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py index 8fc0b51814e..af0dc1ed1f8 100644 --- a/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py +++ b/tests/api_resources/zero_trust/access/applications/test_user_policy_checks.py @@ -21,8 +21,8 @@ class TestUserPolicyChecks: @parametrize def test_method_list(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -30,8 +30,8 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -39,8 +39,8 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -52,8 +52,8 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,14 +68,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @@ -86,8 +86,8 @@ class TestAsyncUserPolicyChecks: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -95,8 +95,8 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -104,8 +104,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -117,8 +117,8 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -133,12 +133,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/certificates/test_settings.py b/tests/api_resources/zero_trust/access/certificates/test_settings.py index 444f9b77fb8..b7b66bf60f7 100644 --- a/tests/api_resources/zero_trust/access/certificates/test_settings.py +++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py @@ -41,7 +41,7 @@ def test_method_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -66,7 +66,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -91,7 +91,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -120,7 +120,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -174,14 +174,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -189,7 +189,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -197,7 +197,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -209,7 +209,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -229,7 +229,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) @@ -257,7 +257,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -282,7 +282,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -336,7 +336,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -390,14 +390,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "hostname": "admin.example.com", }, ], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -405,7 +405,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -413,7 +413,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -425,7 +425,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.settings.with_streaming_response.get( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -445,5 +445,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.settings.with_raw_response.get( - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 30888509a93..1bac74bcb05 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -31,7 +31,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -41,7 +41,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -60,9 +60,9 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -91,13 +91,13 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -133,7 +133,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -149,7 +149,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -163,7 +163,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -187,14 +187,14 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -202,7 +202,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -260,13 +260,13 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -302,7 +302,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -313,7 +313,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -325,7 +325,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -345,7 +345,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -354,7 +354,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -364,7 +364,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -383,9 +383,9 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -414,13 +414,13 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -456,7 +456,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -472,7 +472,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -486,7 +486,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -510,7 +510,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -519,7 +519,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -529,7 +529,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -548,9 +548,9 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -579,13 +579,13 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -621,7 +621,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -637,7 +637,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -651,7 +651,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -675,7 +675,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -683,7 +683,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: def test_method_create_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -692,7 +692,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -715,13 +715,13 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -757,7 +757,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -768,7 +768,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -781,7 +781,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -803,7 +803,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -811,7 +811,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: def test_method_create_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -820,7 +820,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -843,13 +843,13 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -885,7 +885,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -896,7 +896,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -909,7 +909,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -931,7 +931,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -939,7 +939,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: def test_method_create_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -948,7 +948,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -971,13 +971,13 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1013,7 +1013,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -1024,7 +1024,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1037,7 +1037,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1059,14 +1059,14 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_create_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -1074,20 +1074,20 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1123,7 +1123,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -1134,7 +1134,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1146,7 +1146,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1166,17 +1166,17 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1184,10 +1184,10 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1206,9 +1206,9 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1237,13 +1237,13 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1279,7 +1279,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -1293,10 +1293,10 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1308,10 +1308,10 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1326,7 +1326,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", account_id="", @@ -1334,18 +1334,18 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1353,8 +1353,8 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1412,13 +1412,13 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1454,7 +1454,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -1465,8 +1465,8 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -1478,8 +1478,8 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1494,24 +1494,24 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1519,10 +1519,10 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1541,9 +1541,9 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1572,13 +1572,13 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1614,7 +1614,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -1628,10 +1628,10 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1643,10 +1643,10 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1661,7 +1661,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", account_id="", @@ -1669,20 +1669,20 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1690,10 +1690,10 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1712,9 +1712,9 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1743,13 +1743,13 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1785,7 +1785,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -1799,10 +1799,10 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1814,10 +1814,10 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1832,7 +1832,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", account_id="", @@ -1840,19 +1840,19 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1860,9 +1860,9 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1885,13 +1885,13 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -1927,7 +1927,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -1937,9 +1937,9 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1951,9 +1951,9 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1968,25 +1968,25 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -1994,9 +1994,9 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2019,13 +2019,13 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2061,7 +2061,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -2071,9 +2071,9 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2085,9 +2085,9 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2102,25 +2102,25 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -2128,9 +2128,9 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2153,13 +2153,13 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2195,7 +2195,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -2205,9 +2205,9 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2219,9 +2219,9 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2236,24 +2236,24 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -2261,21 +2261,21 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2311,7 +2311,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -2322,8 +2322,8 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2335,8 +2335,8 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2351,21 +2351,21 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -2373,7 +2373,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -2381,7 +2381,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2393,7 +2393,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2413,15 +2413,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -2429,8 +2429,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -2438,8 +2438,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2451,8 +2451,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2467,22 +2467,22 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -2490,8 +2490,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -2499,8 +2499,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2512,8 +2512,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2528,22 +2528,22 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_revoke_tokens(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -2551,8 +2551,8 @@ def test_method_revoke_tokens(self, client: Cloudflare) -> None: @parametrize def test_method_revoke_tokens_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -2560,8 +2560,8 @@ def test_method_revoke_tokens_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_revoke_tokens(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -2573,8 +2573,8 @@ def test_raw_response_revoke_tokens(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_revoke_tokens(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2589,14 +2589,14 @@ def test_streaming_response_revoke_tokens(self, client: Cloudflare) -> None: def test_path_params_revoke_tokens(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @@ -2609,7 +2609,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -2619,7 +2619,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2638,9 +2638,9 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2669,13 +2669,13 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2711,7 +2711,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -2727,7 +2727,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2741,7 +2741,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2765,14 +2765,14 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -2780,7 +2780,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2838,13 +2838,13 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -2880,7 +2880,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -2891,7 +2891,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2903,7 +2903,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2923,7 +2923,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -2932,7 +2932,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -2942,7 +2942,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2961,9 +2961,9 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2992,13 +2992,13 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3034,7 +3034,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -3050,7 +3050,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3064,7 +3064,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3088,7 +3088,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3097,7 +3097,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3107,7 +3107,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -3126,9 +3126,9 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3157,13 +3157,13 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3199,7 +3199,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -3215,7 +3215,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3229,7 +3229,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3253,7 +3253,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3261,7 +3261,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3270,7 +3270,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> async def test_method_create_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3293,13 +3293,13 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3335,7 +3335,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -3346,7 +3346,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3359,7 +3359,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar async def test_streaming_response_create_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3381,7 +3381,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3389,7 +3389,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3398,7 +3398,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> async def test_method_create_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3421,13 +3421,13 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3463,7 +3463,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -3474,7 +3474,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3487,7 +3487,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar async def test_streaming_response_create_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3509,7 +3509,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3517,7 +3517,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3526,7 +3526,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> async def test_method_create_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3549,13 +3549,13 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3591,7 +3591,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -3602,7 +3602,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3615,7 +3615,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar async def test_streaming_response_create_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3637,14 +3637,14 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationCreateResponse], application, path=["response"]) @@ -3652,20 +3652,20 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_create_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( - account_id="string", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3701,7 +3701,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -3712,7 +3712,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3724,7 +3724,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_create_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.create( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3744,17 +3744,17 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.create( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -3762,10 +3762,10 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -3784,9 +3784,9 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3815,13 +3815,13 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -3857,7 +3857,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -3871,10 +3871,10 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3886,10 +3886,10 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3904,7 +3904,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", account_id="", @@ -3912,18 +3912,18 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="self_hosted", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -3931,8 +3931,8 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3990,13 +3990,13 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn }, scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4032,7 +4032,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="saas", @@ -4043,8 +4043,8 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -4056,8 +4056,8 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4072,24 +4072,24 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4097,10 +4097,10 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -4119,9 +4119,9 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4150,13 +4150,13 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4192,7 +4192,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -4206,10 +4206,10 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4221,10 +4221,10 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4239,7 +4239,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", account_id="", @@ -4247,20 +4247,20 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="ssh", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4268,10 +4268,10 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -4290,9 +4290,9 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "allowed_origins": ["https://example.com"], "max_age": -1, }, - custom_deny_message="string", - custom_deny_url="string", - custom_non_identity_deny_url="string", + custom_deny_message="custom_deny_message", + custom_deny_url="custom_deny_url", + custom_non_identity_deny_url="custom_non_identity_deny_url", custom_pages=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4321,13 +4321,13 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn same_site_cookie_attribute="strict", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4363,7 +4363,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, self_hosted_domains=["test.example.com/admin", "test.anotherexample.com/staff"], service_auth_401_redirect=True, @@ -4377,10 +4377,10 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4392,10 +4392,10 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4410,7 +4410,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", account_id="", @@ -4418,19 +4418,19 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", domain="test.example.com/admin", type="vnc", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4438,9 +4438,9 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4463,13 +4463,13 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4505,7 +4505,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -4515,9 +4515,9 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4529,9 +4529,9 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4546,25 +4546,25 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4572,9 +4572,9 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4597,13 +4597,13 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4639,7 +4639,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -4649,9 +4649,9 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4663,9 +4663,9 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4680,25 +4680,25 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="warp", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4706,9 +4706,9 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -4731,13 +4731,13 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn ], scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4773,7 +4773,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, session_duration="24h", ) @@ -4783,9 +4783,9 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4797,9 +4797,9 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4814,24 +4814,24 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", type="biso", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationUpdateResponse], application, path=["response"]) @@ -4839,21 +4839,21 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", scim_config={ "authentication": { - "password": "string", + "password": "password", "scheme": "httpbasic", - "user": "string", + "user": "user", }, "deactivate_on_delete": True, "enabled": True, - "idp_uid": "string", + "idp_uid": "idp_uid", "mappings": [ { "enabled": True, @@ -4889,7 +4889,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn "transform_jsonata": "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", }, ], - "remote_uri": "string", + "remote_uri": "remote_uri", }, tags=["engineers", "engineers", "engineers"], type="bookmark", @@ -4900,8 +4900,8 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -4913,8 +4913,8 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4929,21 +4929,21 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -4951,7 +4951,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ApplicationListResponse], application, path=["response"]) @@ -4959,7 +4959,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4971,7 +4971,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4991,15 +4991,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -5007,8 +5007,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -5016,8 +5016,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -5029,8 +5029,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5045,22 +5045,22 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.delete( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -5068,8 +5068,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(Optional[ApplicationGetResponse], application, path=["response"]) @@ -5077,8 +5077,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -5090,8 +5090,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5106,22 +5106,22 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_revoke_tokens(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -5129,8 +5129,8 @@ async def test_method_revoke_tokens(self, async_client: AsyncCloudflare) -> None @parametrize async def test_method_revoke_tokens_with_all_params(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert_matches_type(object, application, path=["response"]) @@ -5138,8 +5138,8 @@ async def test_method_revoke_tokens_with_all_params(self, async_client: AsyncClo @parametrize async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) assert response.is_closed is True @@ -5151,8 +5151,8 @@ async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) - @parametrize async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.applications.with_streaming_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5167,12 +5167,12 @@ async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudfl async def test_path_params_revoke_tokens(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", + app_id="023e105f4ecef8ad9ca31a8372d0c353", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( - "023e105f4ecef8ad9ca31a8372d0c353", - account_id="string", + app_id="023e105f4ecef8ad9ca31a8372d0c353", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index 5cd16fddf4a..2e04d6c5af3 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -24,7 +24,7 @@ class TestBookmarks: @parametrize def test_method_create(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -62,14 +62,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.create( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -99,7 +99,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -115,14 +115,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.update( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -168,7 +168,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) @@ -176,7 +176,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -188,7 +188,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -203,20 +203,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.delete( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) @@ -224,7 +224,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -236,7 +236,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.bookmarks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -251,13 +251,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): client.zero_trust.access.bookmarks.with_raw_response.get( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -268,7 +268,7 @@ class TestAsyncBookmarks: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -277,7 +277,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -290,7 +290,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -306,14 +306,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.create( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.create( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -321,7 +321,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -330,7 +330,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -343,7 +343,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body={}, ) as response: @@ -359,14 +359,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body={}, ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.update( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", body={}, ) @@ -412,7 +412,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[BookmarkDeleteResponse], bookmark, path=["response"]) @@ -420,7 +420,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -432,7 +432,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -447,20 +447,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.delete( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Bookmark], bookmark, path=["response"]) @@ -468,7 +468,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -480,7 +480,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.bookmarks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -495,12 +495,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + bookmark_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `bookmark_id` but received ''"): await async_client.zero_trust.access.bookmarks.with_raw_response.get( - "", + bookmark_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index cfcd002940d..a6a37770c61 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -27,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -37,7 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -62,7 +62,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -86,16 +86,16 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -103,9 +103,9 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -114,9 +114,9 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -128,9 +128,9 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,30 +145,30 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.update( - "", + certificate_id="", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) @@ -176,7 +176,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) @@ -184,7 +184,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -196,7 +196,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,15 +216,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -232,8 +232,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -241,8 +241,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -254,8 +254,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -270,28 +270,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -299,8 +299,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -308,8 +308,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -321,8 +321,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -337,20 +337,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -363,7 +363,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -373,7 +373,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare certificate = await async_client.zero_trust.access.certificates.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -384,7 +384,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -398,7 +398,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.certificates.with_streaming_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -422,16 +422,16 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.certificates.with_raw_response.create( certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -439,9 +439,9 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -450,9 +450,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -464,9 +464,9 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -481,30 +481,30 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.update( - "", + certificate_id="", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) @@ -512,7 +512,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) @@ -520,7 +520,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -532,7 +532,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -552,15 +552,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -568,8 +568,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -577,8 +577,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -590,8 +590,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -606,28 +606,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -635,8 +635,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -644,8 +644,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -657,8 +657,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -673,18 +673,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( - "", - account_id="string", + certificate_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index 1482ad94f17..552c71677be 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -83,17 +83,17 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.access.custom_pages.with_raw_response.create( account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -101,10 +101,10 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -116,10 +116,10 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -131,10 +131,10 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -149,19 +149,19 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.update( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -206,7 +206,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) @@ -214,7 +214,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -226,7 +226,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -241,20 +241,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.delete( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) @@ -262,7 +262,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -274,7 +274,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.custom_pages.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -289,13 +289,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): client.zero_trust.access.custom_pages.with_raw_response.get( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -308,7 +308,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -318,7 +318,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare custom_page = await async_client.zero_trust.access.custom_pages.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -332,7 +332,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -346,7 +346,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.custom_pages.with_streaming_response.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -363,17 +363,17 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.custom_pages.with_raw_response.create( account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) assert_matches_type(Optional[CustomPageWithoutHTML], custom_page, path=["response"]) @@ -381,10 +381,10 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", app_count=0, created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -396,10 +396,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -411,10 +411,10 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) as response: assert not response.is_closed @@ -429,19 +429,19 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.update( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", custom_html="

Access Denied

", - name="string", + name="name", type="identity_denied", ) @@ -486,7 +486,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPageDeleteResponse], custom_page, path=["response"]) @@ -494,7 +494,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -506,7 +506,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -521,20 +521,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.delete( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[CustomPage], custom_page, path=["response"]) @@ -542,7 +542,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -554,7 +554,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.custom_pages.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -569,12 +569,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + custom_page_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `custom_page_id` but received ''"): await async_client.zero_trust.access.custom_pages.with_raw_response.get( - "", + custom_page_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index c9f83d20c8b..f8f2d26c57f 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -45,7 +45,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -70,7 +70,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -88,7 +88,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,21 +120,21 @@ def test_path_params_create(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -142,14 +142,14 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -168,14 +168,14 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -187,14 +187,14 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -209,19 +209,19 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.zero_trust.access.groups.with_raw_response.update( - "", + group_id="", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -233,21 +233,21 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -255,7 +255,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -263,7 +263,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -275,7 +275,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -295,15 +295,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -311,8 +311,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -320,8 +320,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -333,8 +333,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -349,28 +349,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -378,8 +378,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -387,8 +387,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -400,8 +400,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -416,20 +416,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -446,7 +446,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -460,7 +460,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -485,7 +485,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -503,7 +503,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -535,21 +535,21 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -557,14 +557,14 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -583,14 +583,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -602,14 +602,14 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -624,19 +624,19 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.update( - "", + group_id="", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -648,21 +648,21 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", include=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, ], name="Allow devs", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -670,7 +670,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -678,7 +678,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -690,7 +690,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -710,15 +710,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -726,8 +726,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -735,8 +735,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -748,8 +748,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -764,28 +764,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -793,8 +793,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -802,8 +802,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -815,8 +815,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.groups.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -831,18 +831,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( - "", - account_id="string", + group_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.groups.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + group_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/access/test_policies.py b/tests/api_resources/zero_trust/access/test_policies.py index dd11538c159..168b7507017 100644 --- a/tests/api_resources/zero_trust/access/test_policies.py +++ b/tests/api_resources/zero_trust/access/test_policies.py @@ -53,7 +53,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -134,7 +134,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -149,7 +149,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -162,7 +162,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -191,7 +191,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -210,7 +210,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -232,7 +232,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", decision="allow", include=[ @@ -245,7 +245,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -297,7 +297,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -305,7 +305,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -317,7 +317,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -332,20 +332,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.access.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -353,7 +353,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -365,7 +365,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -380,13 +380,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.access.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -423,7 +423,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -504,7 +504,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -519,7 +519,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -532,7 +532,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare { "approvals_needed": 1, "email_addresses": ["test1@cloudflare.com", "test2@cloudflare.com"], - "email_list_uuid": "string", + "email_list_uuid": "email_list_uuid", }, { "approvals_needed": 3, @@ -561,7 +561,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -580,7 +580,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.policies.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -602,7 +602,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", decision="allow", include=[ @@ -615,7 +615,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.update( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", decision="allow", include=[ @@ -667,7 +667,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -675,7 +675,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -687,7 +687,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -702,20 +702,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.delete( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.access.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[PolicyGetResponse], policy, path=["response"]) @@ -723,7 +723,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -735,7 +735,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -750,12 +750,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.access.policies.with_raw_response.get( - "", + policy_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index 6031d72107d..4d3c6fb8b78 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -27,7 +27,7 @@ class TestServiceTokens: def test_method_create(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -81,15 +81,15 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -97,8 +97,8 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", duration="60m", name="CI/CD token", ) @@ -108,8 +108,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -121,8 +121,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -137,27 +137,27 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -165,7 +165,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -173,7 +173,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -185,7 +185,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -205,15 +205,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -221,8 +221,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -230,8 +230,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -243,8 +243,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -259,28 +259,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -288,8 +288,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -297,8 +297,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -310,8 +310,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -326,26 +326,26 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.get( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @parametrize def test_method_refresh(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -353,7 +353,7 @@ def test_method_refresh(self, client: Cloudflare) -> None: @parametrize def test_raw_response_refresh(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -365,7 +365,7 @@ def test_raw_response_refresh(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_refresh(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -380,20 +380,20 @@ def test_streaming_response_refresh(self, client: Cloudflare) -> None: def test_path_params_refresh(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.refresh( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_rotate(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) @@ -401,7 +401,7 @@ def test_method_rotate(self, client: Cloudflare) -> None: @parametrize def test_raw_response_rotate(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -413,7 +413,7 @@ def test_raw_response_rotate(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_rotate(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -428,13 +428,13 @@ def test_streaming_response_rotate(self, client: Cloudflare) -> None: def test_path_params_rotate(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): client.zero_trust.access.service_tokens.with_raw_response.rotate( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -447,7 +447,7 @@ class TestAsyncServiceTokens: async def test_method_create(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -456,7 +456,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", - account_id="string", + account_id="account_id", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -466,7 +466,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -479,7 +479,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,15 +501,15 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -517,8 +517,8 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", duration="60m", name="CI/CD token", ) @@ -528,8 +528,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -541,8 +541,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -557,27 +557,27 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -585,7 +585,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -593,7 +593,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -605,7 +605,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -625,15 +625,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -641,8 +641,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -650,8 +650,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -663,8 +663,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -679,28 +679,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -708,8 +708,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -717,8 +717,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -730,8 +730,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -746,26 +746,26 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "", - account_id="string", + service_token_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @parametrize async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -773,7 +773,7 @@ async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -785,7 +785,7 @@ async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None @parametrize async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -800,20 +800,20 @@ async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) - async def test_path_params_refresh(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.refresh( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.refresh( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[ServiceTokenRotateResponse], service_token, path=["response"]) @@ -821,7 +821,7 @@ async def test_method_rotate(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -833,7 +833,7 @@ async def test_raw_response_rotate(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.service_tokens.with_streaming_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -848,12 +848,12 @@ async def test_streaming_response_rotate(self, async_client: AsyncCloudflare) -> async def test_path_params_rotate(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.rotate( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + service_token_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `service_token_id` but received ''"): await async_client.zero_trust.access.service_tokens.with_raw_response.rotate( - "", + service_token_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index 23d8586efca..95c8a925393 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -74,7 +74,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -83,7 +83,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -94,7 +94,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -107,7 +107,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) as response: @@ -123,14 +123,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="", name="engineers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): client.zero_trust.access.tags.with_raw_response.update( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -176,7 +176,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) @@ -184,7 +184,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -196,7 +196,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -211,20 +211,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): client.zero_trust.access.tags.with_raw_response.delete( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Tag], tag, path=["response"]) @@ -232,7 +232,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -244,7 +244,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.tags.with_streaming_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -259,13 +259,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): client.zero_trust.access.tags.with_raw_response.get( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -328,7 +328,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -337,7 +337,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", created_at=parse_datetime("2014-01-01T05:20:00.12345Z"), @@ -348,7 +348,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -361,7 +361,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.update( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) as response: @@ -377,14 +377,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.update( - "engineers", + tag_name="engineers", account_id="", name="engineers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.update( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) @@ -430,7 +430,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[TagDeleteResponse], tag, path=["response"]) @@ -438,7 +438,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -450,7 +450,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.delete( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -465,20 +465,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.delete( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.delete( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Tag], tag, path=["response"]) @@ -486,7 +486,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -498,7 +498,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.tags.with_streaming_response.get( - "engineers", + tag_name="engineers", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -513,12 +513,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.get( - "engineers", + tag_name="engineers", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tag_name` but received ''"): await async_client.zero_trust.access.tags.with_raw_response.get( - "", + tag_name="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py index 55ae6bab3de..e0f1db9ea66 100644 --- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py +++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py @@ -21,7 +21,7 @@ class TestActiveSessions: @parametrize def test_method_list(self, client: Cloudflare) -> None: active_session = client.zero_trust.access.users.active_sessions.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.active_sessions.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -56,20 +56,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: active_session = client.zero_trust.access.users.active_sessions.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -78,7 +78,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -91,7 +91,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.users.active_sessions.with_streaming_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -107,21 +107,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `nonce` but received ''"): client.zero_trust.access.users.active_sessions.with_raw_response.get( - "", + nonce="", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -133,7 +133,7 @@ class TestAsyncActiveSessions: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: active_session = await async_client.zero_trust.access.users.active_sessions.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @@ -141,7 +141,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -153,7 +153,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.active_sessions.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -168,20 +168,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: active_session = await async_client.zero_trust.access.users.active_sessions.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -190,7 +190,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) @@ -203,7 +203,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.active_sessions.with_streaming_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) as response: @@ -219,21 +219,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "X1aXj1lFVcqqyoXF", + nonce="X1aXj1lFVcqqyoXF", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `nonce` but received ''"): await async_client.zero_trust.access.users.active_sessions.with_raw_response.get( - "", + nonce="", account_id="023e105f4ecef8ad9ca31a8372d0c353", user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", ) diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py index d2280ea6572..697dbe9181f 100644 --- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py +++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py @@ -21,7 +21,7 @@ class TestFailedLogins: @parametrize def test_method_list(self, client: Cloudflare) -> None: failed_login = client.zero_trust.access.users.failed_logins.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.users.failed_logins.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -56,13 +56,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.failed_logins.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -73,7 +73,7 @@ class TestAsyncFailedLogins: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: failed_login = await async_client.zero_trust.access.users.failed_logins.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @@ -81,7 +81,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -93,7 +93,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.failed_logins.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -108,12 +108,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.users.failed_logins.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.failed_logins.with_raw_response.list( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py index 6363aec38d0..9b7d2644d33 100644 --- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py +++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py @@ -20,7 +20,7 @@ class TestLastSeenIdentity: @parametrize def test_method_get(self, client: Cloudflare) -> None: last_seen_identity = client.zero_trust.access.users.last_seen_identity.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.users.last_seen_identity.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -72,7 +72,7 @@ class TestAsyncLastSeenIdentity: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: last_seen_identity = await async_client.zero_trust.access.users.last_seen_identity.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[Identity], last_seen_identity, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.access.users.last_seen_identity.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + user_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.access.users.last_seen_identity.with_raw_response.get( - "", + user_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/devices/policies/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/test_excludes.py index b1a2f9aa2eb..053960e74cf 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_excludes.py @@ -157,7 +157,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: exclude = client.zero_trust.devices.policies.excludes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) @@ -165,7 +165,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -177,7 +177,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.excludes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -192,13 +192,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.excludes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -341,7 +341,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: exclude = await async_client.zero_trust.devices.policies.excludes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ExcludeGetResponse], exclude, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -361,7 +361,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.excludes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -376,12 +376,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.excludes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.excludes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py index 353bee364cd..71cf3cd9f87 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py @@ -25,7 +25,7 @@ class TestFallbackDomains: @parametrize def test_method_update(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -34,7 +34,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -47,7 +47,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) as response: @@ -63,14 +63,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -116,7 +116,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) @@ -124,7 +124,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -136,7 +136,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.fallback_domains.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -151,13 +151,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -168,7 +168,7 @@ class TestAsyncFallbackDomains: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -177,7 +177,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -190,7 +190,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.fallback_domains.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) as response: @@ -206,14 +206,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.update( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", body=[{"suffix": "example.com"}, {"suffix": "example.com"}, {"suffix": "example.com"}], ) @@ -259,7 +259,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[FallbackDomainGetResponse], fallback_domain, path=["response"]) @@ -267,7 +267,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -279,7 +279,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.fallback_domains.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -294,12 +294,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.fallback_domains.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/policies/test_includes.py b/tests/api_resources/zero_trust/devices/policies/test_includes.py index 76833b163c9..e858168766f 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_includes.py @@ -157,7 +157,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: include = client.zero_trust.devices.policies.includes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) @@ -165,7 +165,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -177,7 +177,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.includes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -192,13 +192,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.includes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -341,7 +341,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: include = await async_client.zero_trust.devices.policies.includes.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[IncludeGetResponse], include, path=["response"]) @@ -349,7 +349,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -361,7 +361,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.includes.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -376,12 +376,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.includes.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.includes.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index eda7def2266..6ad1c0fabd0 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -152,7 +152,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) @@ -160,7 +160,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -172,7 +172,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -187,20 +187,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -208,7 +208,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "api_url": "https://as123.awmdm.com/API", @@ -225,7 +225,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -237,7 +237,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -252,20 +252,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -273,7 +273,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -285,7 +285,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.integrations.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -300,13 +300,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.devices.posture.integrations.with_raw_response.get( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -445,7 +445,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(IntegrationDeleteResponse, integration, path=["response"]) @@ -453,7 +453,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -465,7 +465,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -480,20 +480,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.delete( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -501,7 +501,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "api_url": "https://as123.awmdm.com/API", @@ -518,7 +518,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -530,7 +530,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -545,20 +545,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.edit( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Integration], integration, path=["response"]) @@ -566,7 +566,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -578,7 +578,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.integrations.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -593,12 +593,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + integration_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.devices.posture.integrations.with_raw_response.get( - "", + integration_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index 314ea6a8316..8fca61704e4 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -48,18 +48,18 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -112,7 +112,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -124,7 +124,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={ "host": "https://dash.cloudflare.com", @@ -138,18 +138,18 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -159,7 +159,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -175,7 +175,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -194,7 +194,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", data={}, enabled=True, @@ -204,7 +204,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.update( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -253,7 +253,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) @@ -261,7 +261,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -273,7 +273,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -288,20 +288,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.delete( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) @@ -309,7 +309,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -321,7 +321,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.dex_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -336,13 +336,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): client.zero_trust.devices.dex_tests.with_raw_response.get( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -377,18 +377,18 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -441,7 +441,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -453,7 +453,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={ "host": "https://dash.cloudflare.com", @@ -467,18 +467,18 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare target_policies=[ { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, { "default": True, - "id": "string", - "name": "string", + "id": "id", + "name": "name", }, ], targeted=True, @@ -488,7 +488,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -504,7 +504,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -523,7 +523,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", data={}, enabled=True, @@ -533,7 +533,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.update( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", data={}, enabled=True, @@ -582,7 +582,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DEXTestDeleteResponse], dex_test, path=["response"]) @@ -590,7 +590,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -602,7 +602,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -617,20 +617,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.delete( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SchemaHTTP], dex_test, path=["response"]) @@ -638,7 +638,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -650,7 +650,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.dex_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -665,12 +665,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + dex_test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dex_test_id` but received ''"): await async_client.zero_trust.devices.dex_tests.with_raw_response.get( - "", + dex_test_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index 0b6ac3bd334..3d6c9bacbe1 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -87,7 +87,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -95,7 +95,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c", @@ -109,7 +109,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -121,7 +121,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -136,13 +136,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.update( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -187,7 +187,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) @@ -195,7 +195,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -207,7 +207,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -222,20 +222,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.delete( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -243,7 +243,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -255,7 +255,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.networks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -270,13 +270,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): client.zero_trust.devices.networks.with_raw_response.get( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -350,7 +350,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -358,7 +358,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c", @@ -372,7 +372,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -384,7 +384,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -399,13 +399,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.update( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -450,7 +450,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[NetworkDeleteResponse], network, path=["response"]) @@ -458,7 +458,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -470,7 +470,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -485,20 +485,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.delete( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DeviceNetwork], network, path=["response"]) @@ -506,7 +506,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -518,7 +518,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.networks.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -533,12 +533,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + network_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `network_id` but received ''"): await async_client.zero_trust.devices.networks.with_raw_response.get( - "", + network_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_override_codes.py b/tests/api_resources/zero_trust/devices/test_override_codes.py index c7ee58f5b0d..263f3c9c113 100644 --- a/tests/api_resources/zero_trust/devices/test_override_codes.py +++ b/tests/api_resources/zero_trust/devices/test_override_codes.py @@ -20,7 +20,7 @@ class TestOverrideCodes: @parametrize def test_method_list(self, client: Cloudflare) -> None: override_code = client.zero_trust.devices.override_codes.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) @@ -28,7 +28,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -40,7 +40,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.devices.override_codes.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): client.zero_trust.devices.override_codes.with_raw_response.list( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -72,7 +72,7 @@ class TestAsyncOverrideCodes: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: override_code = await async_client.zero_trust.devices.override_codes.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[OverrideCodeListResponse], override_code, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -92,7 +92,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.override_codes.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.override_codes.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): await async_client.zero_trust.devices.override_codes.with_raw_response.list( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_policies.py b/tests/api_resources/zero_trust/devices/test_policies.py index 0261a6987c7..2e93c0f2870 100644 --- a/tests/api_resources/zero_trust/devices/test_policies.py +++ b/tests/api_resources/zero_trust/devices/test_policies.py @@ -144,7 +144,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -152,7 +152,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -164,7 +164,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -179,13 +179,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.delete( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -193,7 +193,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: @parametrize def test_method_edit(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -202,7 +202,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", allow_mode_switch=True, allow_updates=True, @@ -229,7 +229,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -242,7 +242,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -258,13 +258,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.edit( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -272,7 +272,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -281,7 +281,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -294,7 +294,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -310,13 +310,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): client.zero_trust.devices.policies.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -447,7 +447,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -455,7 +455,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -467,7 +467,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -482,13 +482,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.delete( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -496,7 +496,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", allow_mode_switch=True, allow_updates=True, @@ -532,7 +532,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -545,7 +545,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -561,13 +561,13 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.edit( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -575,7 +575,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[SettingsPolicy], policy, path=["response"]) @@ -584,7 +584,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -597,7 +597,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.policies.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -613,12 +613,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + policy_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"): await async_client.zero_trust.devices.policies.with_raw_response.get( - "", + policy_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 7f171f6c382..7470b1a4cba 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -90,7 +90,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -100,7 +100,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -121,7 +121,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -135,7 +135,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -152,7 +152,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", type="file", @@ -160,7 +160,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -207,7 +207,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) @@ -215,7 +215,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -227,7 +227,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -242,20 +242,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) @@ -263,7 +263,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -275,7 +275,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.posture.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -290,13 +290,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.devices.posture.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -373,7 +373,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -383,7 +383,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -404,7 +404,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -418,7 +418,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -435,7 +435,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", type="file", @@ -443,7 +443,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", type="file", @@ -490,7 +490,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[PostureDeleteResponse], posture, path=["response"]) @@ -498,7 +498,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -510,7 +510,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -525,20 +525,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[DevicePostureRule], posture, path=["response"]) @@ -546,7 +546,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -558,7 +558,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.posture.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -573,12 +573,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.devices.posture.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py index 73561c37fb5..c2f629b06be 100644 --- a/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py +++ b/tests/api_resources/zero_trust/dex/http_tests/test_percentiles.py @@ -20,7 +20,7 @@ class TestPercentiles: @parametrize def test_method_get(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -30,11 +30,11 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: percentile = client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) @@ -42,7 +42,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -56,7 +56,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -73,7 +73,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -81,7 +81,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -94,7 +94,7 @@ class TestAsyncPercentiles: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -104,11 +104,11 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: percentile = await async_client.zero_trust.dex.http_tests.percentiles.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetailsPercentiles], percentile, path=["response"]) @@ -116,7 +116,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -130,7 +130,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.http_tests.percentiles.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -147,7 +147,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -155,7 +155,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.http_tests.percentiles.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 2b038de5a40..22013108b00 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -20,7 +20,7 @@ class TestHTTPTests: @parametrize def test_method_get(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -31,12 +31,12 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: http_test = client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -44,7 +44,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -59,7 +59,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.http_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -77,7 +77,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -86,7 +86,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.http_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -100,7 +100,7 @@ class TestAsyncHTTPTests: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: http_test = await async_client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -111,12 +111,12 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: http_test = await async_client.zero_trust.dex.http_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -124,7 +124,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -139,7 +139,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.http_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -157,7 +157,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.http_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -166,7 +166,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.http_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", diff --git a/tests/api_resources/zero_trust/dex/test_tests.py b/tests/api_resources/zero_trust/dex/test_tests.py index 71f56cc7e84..70da26054c3 100644 --- a/tests/api_resources/zero_trust/dex/test_tests.py +++ b/tests/api_resources/zero_trust/dex/test_tests.py @@ -29,11 +29,11 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: test = client.zero_trust.dex.tests.list( account_id="01a7362d577a6c3019a474fd6f485823", - colo="string", + colo="colo", device_id=["string", "string", "string"], page=1, per_page=1, - test_name="string", + test_name="testName", ) assert_matches_type(SyncV4PagePagination[TestListResponse], test, path=["response"]) @@ -83,11 +83,11 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: test = await async_client.zero_trust.dex.tests.list( account_id="01a7362d577a6c3019a474fd6f485823", - colo="string", + colo="colo", device_id=["string", "string", "string"], page=1, per_page=1, - test_name="string", + test_name="testName", ) assert_matches_type(AsyncV4PagePagination[TestListResponse], test, path=["response"]) diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index a5a47a30db8..a324201b35f 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -24,7 +24,7 @@ class TestTracerouteTests: @parametrize def test_method_get(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -35,12 +35,12 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -48,7 +48,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -63,7 +63,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -81,7 +81,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -90,7 +90,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -100,9 +100,9 @@ def test_path_params_get(self, client: Cloudflare) -> None: @parametrize def test_method_network_path(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -112,9 +112,9 @@ def test_method_network_path(self, client: Cloudflare) -> None: @parametrize def test_raw_response_network_path(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -128,9 +128,9 @@ def test_raw_response_network_path(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_network_path(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -147,9 +147,9 @@ def test_streaming_response_network_path(self, client: Cloudflare) -> None: def test_path_params_network_path(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -157,9 +157,9 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -168,7 +168,7 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: @parametrize def test_method_percentiles(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -178,11 +178,11 @@ def test_method_percentiles(self, client: Cloudflare) -> None: @parametrize def test_method_percentiles_with_all_params(self, client: Cloudflare) -> None: traceroute_test = client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) @@ -190,7 +190,7 @@ def test_method_percentiles_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_percentiles(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -204,7 +204,7 @@ def test_raw_response_percentiles(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_percentiles(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -221,7 +221,7 @@ def test_streaming_response_percentiles(self, client: Cloudflare) -> None: def test_path_params_percentiles(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -229,7 +229,7 @@ def test_path_params_percentiles(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -242,7 +242,7 @@ class TestAsyncTracerouteTests: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -253,12 +253,12 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", to="1689606812000", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -266,7 +266,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -281,7 +281,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -299,7 +299,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="1689520412000", interval="minute", @@ -308,7 +308,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.get( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="1689520412000", interval="minute", @@ -318,9 +318,9 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -330,9 +330,9 @@ async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -346,9 +346,9 @@ async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> @parametrize async def test_streaming_response_network_path(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -365,9 +365,9 @@ async def test_streaming_response_network_path(self, async_client: AsyncCloudfla async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -375,9 +375,9 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.network_path( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", - device_id="string", + device_id="deviceId", from_="1689520412000", interval="minute", to="1689606812000", @@ -386,7 +386,7 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_percentiles(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -396,11 +396,11 @@ async def test_method_percentiles(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_percentiles_with_all_params(self, async_client: AsyncCloudflare) -> None: traceroute_test = await async_client.zero_trust.dex.traceroute_tests.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", - colo="string", + colo="colo", device_id=["string", "string", "string"], ) assert_matches_type(Optional[TracerouteTestPercentilesResponse], traceroute_test, path=["response"]) @@ -408,7 +408,7 @@ async def test_method_percentiles_with_all_params(self, async_client: AsyncCloud @parametrize async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -422,7 +422,7 @@ async def test_raw_response_percentiles(self, async_client: AsyncCloudflare) -> @parametrize async def test_streaming_response_percentiles(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_tests.with_streaming_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -439,7 +439,7 @@ async def test_streaming_response_percentiles(self, async_client: AsyncCloudflar async def test_path_params_percentiles(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", @@ -447,7 +447,7 @@ async def test_path_params_percentiles(self, async_client: AsyncCloudflare) -> N with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): await async_client.zero_trust.dex.traceroute_tests.with_raw_response.percentiles( - "", + test_id="", account_id="01a7362d577a6c3019a474fd6f485823", from_="2023-09-20T17:00:00Z", to="2023-09-20T17:00:00Z", diff --git a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py index 849b8c5cc07..73c1aa94ebf 100644 --- a/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py +++ b/tests/api_resources/zero_trust/dex/tests/test_unique_devices.py @@ -29,7 +29,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: unique_device = client.zero_trust.dex.tests.unique_devices.list( account_id="01a7362d577a6c3019a474fd6f485823", device_id=["string", "string", "string"], - test_name="string", + test_name="testName", ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) unique_device = await async_client.zero_trust.dex.tests.unique_devices.list( account_id="01a7362d577a6c3019a474fd6f485823", device_id=["string", "string", "string"], - test_name="string", + test_name="testName", ) assert_matches_type(Optional[UniqueDevices], unique_device, path=["response"]) diff --git a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py index 0a12a7ccea1..cde7d16b706 100644 --- a/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py +++ b/tests/api_resources/zero_trust/dex/traceroute_test_results/test_network_path.py @@ -20,7 +20,7 @@ class TestNetworkPath: @parametrize def test_method_get(self, client: Cloudflare) -> None: network_path = client.zero_trust.dex.traceroute_test_results.network_path.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dex.traceroute_test_results.network_path.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_result_id` but received ''"): client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "", + test_result_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -72,7 +72,7 @@ class TestAsyncNetworkPath: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: network_path = await async_client.zero_trust.dex.traceroute_test_results.network_path.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) assert_matches_type(Optional[NetworkPathGetResponse], network_path, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dex.traceroute_test_results.network_path.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + test_result_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_result_id` but received ''"): await async_client.zero_trust.dex.traceroute_test_results.network_path.with_raw_response.get( - "", + test_result_id="", account_id="01a7362d577a6c3019a474fd6f485823", ) diff --git a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py index 625c13ce809..4521acb1e12 100644 --- a/tests/api_resources/zero_trust/dlp/datasets/test_upload.py +++ b/tests/api_resources/zero_trust/dlp/datasets/test_upload.py @@ -21,16 +21,16 @@ class TestUpload: @parametrize def test_method_create(self, client: Cloudflare) -> None: upload = client.zero_trust.dlp.datasets.upload.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[NewVersion], upload, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -41,8 +41,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.upload.with_streaming_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,24 +56,24 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_edit(self, client: Cloudflare) -> None: upload = client.zero_trust.dlp.datasets.upload.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert_matches_type(Optional[Dataset], upload, path=["response"]) @@ -81,10 +81,10 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert response.is_closed is True @@ -96,10 +96,10 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.upload.with_streaming_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,18 +114,18 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, + version=0, account_id="", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="", - body="string", + body="body", ) @@ -135,16 +135,16 @@ class TestAsyncUpload: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: upload = await async_client.zero_trust.dlp.datasets.upload.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[NewVersion], upload, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -155,8 +155,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,24 +170,24 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.upload.with_raw_response.create( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: upload = await async_client.zero_trust.dlp.datasets.upload.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert_matches_type(Optional[Dataset], upload, path=["response"]) @@ -195,10 +195,10 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) assert response.is_closed is True @@ -210,10 +210,10 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.upload.with_streaming_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,16 +228,16 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, + version=0, account_id="", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - body="string", + body="body", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit( - 0, - account_id="string", + version=0, + account_id="account_id", dataset_id="", - body="string", + body="body", ) diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py index fdf6e69b362..9ecae87e3a0 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_custom.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_custom.py @@ -66,7 +66,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -74,7 +74,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -120,7 +120,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -147,20 +147,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomDeleteResponse, custom, path=["response"]) @@ -168,7 +168,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -180,7 +180,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -195,20 +195,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: custom = client.zero_trust.dlp.profiles.custom.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -216,7 +216,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -228,7 +228,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.custom.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -243,13 +243,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -302,7 +302,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -310,7 +310,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -356,7 +356,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -368,7 +368,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -383,20 +383,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomDeleteResponse, custom, path=["response"]) @@ -404,7 +404,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -416,7 +416,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -431,20 +431,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.delete( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom = await async_client.zero_trust.dlp.profiles.custom.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(CustomProfile, custom, path=["response"]) @@ -452,7 +452,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -464,7 +464,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.custom.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -479,12 +479,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.custom.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py index b8209257160..922235bf6ec 100644 --- a/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py +++ b/tests/api_resources/zero_trust/dlp/profiles/test_predefined.py @@ -20,7 +20,7 @@ class TestPredefined: @parametrize def test_method_update(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -43,7 +43,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -55,7 +55,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.predefined.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -70,20 +70,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: predefined = client.zero_trust.dlp.profiles.predefined.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -91,7 +91,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -103,7 +103,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.predefined.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -118,13 +118,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -135,7 +135,7 @@ class TestAsyncPredefined: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -143,7 +143,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", allowed_match_count=5, context_awareness={ @@ -158,7 +158,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -170,7 +170,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -185,20 +185,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.update( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: predefined = await async_client.zero_trust.dlp.profiles.predefined.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(PredefinedProfile, predefined, path=["response"]) @@ -206,7 +206,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -218,7 +218,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.predefined.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -233,12 +233,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.predefined.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py index 1e41d7f1260..a2f374f281f 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -21,17 +21,17 @@ class TestDatasets: @parametrize def test_method_create(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", - description="string", + account_id="account_id", + name="name", + description="description", secret=True, ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @@ -39,8 +39,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert response.is_closed is True @@ -51,8 +51,8 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,32 +67,32 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.create( account_id="", - name="string", + name="name", ) @parametrize def test_method_update(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", - description="string", - name="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + description="description", + name="name", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -103,8 +103,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -118,27 +118,27 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.update( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize def test_method_list(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[Dataset], dataset, path=["response"]) @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -149,7 +149,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -169,16 +169,16 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert dataset is None @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -189,8 +189,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,29 +204,29 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.delete( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -237,8 +237,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.datasets.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -252,14 +252,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): client.zero_trust.dlp.datasets.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @@ -269,17 +269,17 @@ class TestAsyncDatasets: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.create( - account_id="string", - name="string", - description="string", + account_id="account_id", + name="name", + description="description", secret=True, ) assert_matches_type(Optional[DatasetCreation], dataset, path=["response"]) @@ -287,8 +287,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) assert response.is_closed is True @@ -299,8 +299,8 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.create( - account_id="string", - name="string", + account_id="account_id", + name="name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -315,32 +315,32 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.create( account_id="", - name="string", + name="name", ) @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", - description="string", - name="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", + description="description", + name="name", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -351,8 +351,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -366,27 +366,27 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.update( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[Dataset], dataset, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -397,7 +397,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -417,16 +417,16 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert dataset is None @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -437,8 +437,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -452,29 +452,29 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.delete( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[Dataset], dataset, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -485,8 +485,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.datasets.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -500,12 +500,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): await async_client.zero_trust.dlp.datasets.with_raw_response.get( - "", - account_id="string", + dataset_id="", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py index 5984f84df7c..6747a23a14c 100644 --- a/tests/api_resources/zero_trust/dlp/test_profiles.py +++ b/tests/api_resources/zero_trust/dlp/test_profiles.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: profile = client.zero_trust.dlp.profiles.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.dlp.profiles.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -94,13 +94,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): client.zero_trust.dlp.profiles.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -149,7 +149,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: profile = await async_client.zero_trust.dlp.profiles.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(ProfileGetResponse, profile, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -169,7 +169,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.dlp.profiles.with_streaming_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -184,12 +184,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.dlp.profiles.with_raw_response.get( - "384e129d-25bd-403c-8019-bc19eb7a8a5f", + profile_id="384e129d-25bd-403c-8019-bc19eb7a8a5f", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `profile_id` but received ''"): await async_client.zero_trust.dlp.profiles.with_raw_response.get( - "", + profile_id="", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py index 776794c88f4..9fcc52d42a2 100644 --- a/tests/api_resources/zero_trust/gateway/lists/test_items.py +++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py @@ -21,7 +21,7 @@ class TestItems: @parametrize def test_method_list(self, client: Cloudflare) -> None: item = client.zero_trust.gateway.lists.items.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.items.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -56,13 +56,13 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.items.with_raw_response.list( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -73,7 +73,7 @@ class TestAsyncItems: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: item = await async_client.zero_trust.gateway.lists.items.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) @@ -81,7 +81,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -93,7 +93,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.items.with_streaming_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -108,12 +108,12 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.lists.items.with_raw_response.list( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.items.with_raw_response.list( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_certificates.py b/tests/api_resources/zero_trust/gateway/test_certificates.py index c84aaa00883..9d608b63c19 100644 --- a/tests/api_resources/zero_trust/gateway/test_certificates.py +++ b/tests/api_resources/zero_trust/gateway/test_certificates.py @@ -110,7 +110,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: certificate = client.zero_trust.gateway.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -118,7 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -130,7 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.certificates.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -145,20 +145,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.gateway.certificates.with_raw_response.delete( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: certificate = client.zero_trust.gateway.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -166,7 +166,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -178,7 +178,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -193,13 +193,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): client.zero_trust.gateway.certificates.with_raw_response.get( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -294,7 +294,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.gateway.certificates.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -302,7 +302,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -314,7 +314,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.certificates.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -329,20 +329,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.certificates.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.gateway.certificates.with_raw_response.delete( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.gateway.certificates.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[CertificateGetResponse], certificate, path=["response"]) @@ -350,7 +350,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -362,7 +362,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.certificates.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -377,12 +377,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.certificates.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + certificate_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `certificate_id` but received ''"): await async_client.zero_trust.gateway.certificates.with_raw_response.get( - "", + certificate_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_configurations.py b/tests/api_resources/zero_trust/gateway/test_configurations.py index 795445ac228..797541e090e 100644 --- a/tests/api_resources/zero_trust/gateway/test_configurations.py +++ b/tests/api_resources/zero_trust/gateway/test_configurations.py @@ -40,12 +40,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", @@ -123,12 +123,12 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", @@ -248,12 +248,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", @@ -331,12 +331,12 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "fail_closed": False, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, }, "block_page": { - "background_color": "string", + "background_color": "background_color", "enabled": True, "footer_text": "--footer--", "header_text": "--header--", diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index 08692169cfc..e549fedeff9 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -99,7 +99,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", description="The serial numbers for administrators", @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -131,7 +131,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) as response: @@ -147,14 +147,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.update( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -208,7 +208,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -216,7 +216,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -228,7 +228,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -243,20 +243,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.delete( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -264,7 +264,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", append=[ { @@ -290,7 +290,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -302,7 +302,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -317,20 +317,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.edit( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: list_ = client.zero_trust.gateway.lists.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -338,7 +338,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -350,7 +350,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.lists.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -365,13 +365,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.zero_trust.gateway.lists.with_raw_response.get( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -455,7 +455,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -464,7 +464,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", description="The serial numbers for administrators", @@ -474,7 +474,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -487,7 +487,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) as response: @@ -503,14 +503,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", name="Admin Serial Numbers", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.update( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", name="Admin Serial Numbers", ) @@ -564,7 +564,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ListDeleteResponse], list_, path=["response"]) @@ -572,7 +572,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -584,7 +584,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -599,20 +599,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.delete( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -620,7 +620,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", append=[ { @@ -646,7 +646,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -658,7 +658,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -673,20 +673,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.edit( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.edit( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: list_ = await async_client.zero_trust.gateway.lists.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayList], list_, path=["response"]) @@ -694,7 +694,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -706,7 +706,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.lists.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -721,12 +721,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + list_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.zero_trust.gateway.lists.with_raw_response.get( - "", + list_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index 6051b87485f..9cc5069d7ef 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -77,7 +77,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, @@ -98,7 +98,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -111,7 +111,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) as response: @@ -127,14 +127,14 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", name="Austin Office Location", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.update( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -180,7 +180,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) @@ -188,7 +188,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -200,7 +200,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -215,20 +215,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.delete( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Location], location, path=["response"]) @@ -236,7 +236,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -248,7 +248,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.locations.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -263,13 +263,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): client.zero_trust.gateway.locations.with_raw_response.get( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -333,7 +333,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -342,7 +342,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", client_default=False, @@ -354,7 +354,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -367,7 +367,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) as response: @@ -383,14 +383,14 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.update( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", name="Austin Office Location", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.update( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", name="Austin Office Location", ) @@ -436,7 +436,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[LocationDeleteResponse], location, path=["response"]) @@ -444,7 +444,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -456,7 +456,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -471,20 +471,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.delete( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[Location], location, path=["response"]) @@ -492,7 +492,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -504,7 +504,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.locations.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -519,12 +519,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + location_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `location_id` but received ''"): await async_client.zero_trust.gateway.locations.with_raw_response.get( - "", + location_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py index 2d5b505ed3c..07750823931 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -108,7 +108,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) @@ -116,7 +116,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -128,7 +128,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -143,20 +143,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) @@ -164,7 +164,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ips=["192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"], name="Devops team", @@ -174,7 +174,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -186,7 +186,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -201,20 +201,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointGetResponse], proxy_endpoint, path=["response"]) @@ -222,7 +222,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -234,7 +234,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.proxy_endpoints.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -249,13 +249,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -350,7 +350,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointDeleteResponse], proxy_endpoint, path=["response"]) @@ -358,7 +358,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -370,7 +370,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -385,20 +385,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.delete( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpoint], proxy_endpoint, path=["response"]) @@ -406,7 +406,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ips=["192.0.2.1/32", "192.0.2.1/32", "192.0.2.1/32"], name="Devops team", @@ -416,7 +416,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -428,7 +428,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -443,20 +443,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.edit( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ProxyEndpointGetResponse], proxy_endpoint, path=["response"]) @@ -464,7 +464,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) @@ -476,7 +476,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.proxy_endpoints.with_streaming_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -491,12 +491,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "ed35569b41ce4d1facfe683550f54086", + proxy_endpoint_id="ed35569b41ce4d1facfe683550f54086", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `proxy_endpoint_id` but received ''"): await async_client.zero_trust.gateway.proxy_endpoints.with_raw_response.get( - "", + proxy_endpoint_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index 924ce1fa37b..c0aa119c722 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -120,8 +120,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -183,7 +183,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -193,7 +193,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -281,8 +281,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -307,7 +307,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -321,7 +321,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -338,7 +338,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", action="allow", name="block bad websites", @@ -346,7 +346,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -393,7 +393,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) @@ -401,7 +401,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -413,7 +413,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -428,20 +428,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) @@ -449,7 +449,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -461,7 +461,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.gateway.rules.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -476,13 +476,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): client.zero_trust.gateway.rules.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -589,8 +589,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -652,7 +652,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -662,7 +662,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -750,8 +750,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, "notification_settings": { "enabled": True, - "msg": "string", - "support_url": "string", + "msg": "msg", + "support_url": "support_url", }, "override_host": "example.com", "override_ips": ["1.1.1.1", "2.2.2.2"], @@ -776,7 +776,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -790,7 +790,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -807,7 +807,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", action="allow", name="block bad websites", @@ -815,7 +815,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.update( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", action="allow", name="block bad websites", @@ -862,7 +862,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[RuleDeleteResponse], rule, path=["response"]) @@ -870,7 +870,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -882,7 +882,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -897,20 +897,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.delete( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[GatewayRule], rule, path=["response"]) @@ -918,7 +918,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -930,7 +930,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.gateway.rules.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -945,12 +945,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): await async_client.zero_trust.gateway.rules.with_raw_response.get( - "", + rule_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/routes/test_ips.py b/tests/api_resources/zero_trust/networks/routes/test_ips.py index c21dd1b14b1..2f78627ef93 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_ips.py +++ b/tests/api_resources/zero_trust/networks/routes/test_ips.py @@ -20,7 +20,7 @@ class TestIPs: @parametrize def test_method_get(self, client: Cloudflare) -> None: ip = client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Teamnet, ip, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: ip = client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -37,7 +37,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) @@ -49,7 +49,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.ips.with_streaming_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -64,13 +64,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip` but received ''"): client.zero_trust.networks.routes.ips.with_raw_response.get( - "", + ip="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -81,7 +81,7 @@ class TestAsyncIPs: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip = await async_client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Teamnet, ip, path=["response"]) @@ -89,7 +89,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: ip = await async_client.zero_trust.networks.routes.ips.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -98,7 +98,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) @@ -110,7 +110,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.ips.with_streaming_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -125,12 +125,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.routes.ips.with_raw_response.get( - "10.1.0.137", + ip="10.1.0.137", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip` but received ''"): await async_client.zero_trust.networks.routes.ips.with_raw_response.get( - "", + ip="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/routes/test_networks.py b/tests/api_resources/zero_trust/networks/routes/test_networks.py index e00d2809cc0..484c99fdd33 100644 --- a/tests/api_resources/zero_trust/networks/routes/test_networks.py +++ b/tests/api_resources/zero_trust/networks/routes/test_networks.py @@ -20,7 +20,7 @@ class TestNetworks: @parametrize def test_method_create(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -65,20 +65,20 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.create( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_delete(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -86,7 +86,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", tun_type="cfd_tunnel", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -97,7 +97,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -109,7 +109,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -124,20 +124,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.delete( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: network = client.zero_trust.networks.routes.networks.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -145,7 +145,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -157,7 +157,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.networks.with_streaming_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -172,13 +172,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): client.zero_trust.networks.routes.networks.with_raw_response.edit( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -189,7 +189,7 @@ class TestAsyncNetworks: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -197,7 +197,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -207,7 +207,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -219,7 +219,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -234,20 +234,20 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.create( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.create( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -255,7 +255,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", tun_type="cfd_tunnel", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", @@ -266,7 +266,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -278,7 +278,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -293,20 +293,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.delete( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.delete( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.networks.routes.networks.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, network, path=["response"]) @@ -314,7 +314,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) @@ -326,7 +326,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.networks.with_streaming_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -341,12 +341,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.edit( - "172.16.0.0%2F16", + ip_network_encoded="172.16.0.0%2F16", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"): await async_client.zero_trust.networks.routes.networks.with_raw_response.edit( - "", + ip_network_encoded="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/test_routes.py b/tests/api_resources/zero_trust/networks/test_routes.py index 8406fdd7204..be4aa81b146 100644 --- a/tests/api_resources/zero_trust/networks/test_routes.py +++ b/tests/api_resources/zero_trust/networks/test_routes.py @@ -133,7 +133,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -141,7 +141,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -153,7 +153,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -168,20 +168,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.zero_trust.networks.routes.with_raw_response.delete( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -189,7 +189,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: route = client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", network="172.16.0.0/16", @@ -200,7 +200,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -212,7 +212,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.routes.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -227,13 +227,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): client.zero_trust.networks.routes.with_raw_response.edit( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -352,7 +352,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -360,7 +360,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -372,7 +372,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -387,20 +387,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.routes.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.zero_trust.networks.routes.with_raw_response.delete( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Route, route, path=["response"]) @@ -408,7 +408,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.zero_trust.networks.routes.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Example comment for this route.", network="172.16.0.0/16", @@ -419,7 +419,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -431,7 +431,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.routes.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -446,12 +446,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.routes.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + route_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `route_id` but received ''"): await async_client.zero_trust.networks.routes.with_raw_response.edit( - "", + route_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py index 3bb59293bd8..14297d4757a 100644 --- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py +++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py @@ -127,7 +127,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) @@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -147,7 +147,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -162,20 +162,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) @@ -183,7 +183,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Staging VPC for data science", is_default_network=True, @@ -194,7 +194,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -206,7 +206,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.networks.virtual_networks.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -221,13 +221,13 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -339,7 +339,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkDeleteResponse, virtual_network, path=["response"]) @@ -347,7 +347,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -359,7 +359,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -374,20 +374,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.delete( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(VirtualNetworkEditResponse, virtual_network, path=["response"]) @@ -395,7 +395,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", comment="Staging VPC for data science", is_default_network=True, @@ -406,7 +406,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -418,7 +418,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.networks.virtual_networks.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -433,12 +433,12 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `virtual_network_id` but received ''"): await async_client.zero_trust.networks.virtual_networks.with_raw_response.edit( - "", + virtual_network_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py index 6f7e3ae07d5..3e0087721b2 100644 --- a/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py +++ b/tests/api_resources/zero_trust/risk_scoring/integrations/test_references.py @@ -20,16 +20,16 @@ class TestReferences: @parametrize def test_method_get(self, client: Cloudflare) -> None: reference = client.zero_trust.risk_scoring.integrations.references.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert response.is_closed is True @@ -40,8 +40,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.references.with_streaming_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -55,14 +55,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", + reference_id="reference_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `reference_id` but received ''"): client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "", - account_id="string", + reference_id="", + account_id="account_id", ) @@ -72,16 +72,16 @@ class TestAsyncReferences: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: reference = await async_client.zero_trust.risk_scoring.integrations.references.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert_matches_type(Optional[ReferenceGetResponse], reference, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) assert response.is_closed is True @@ -92,8 +92,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.references.with_streaming_response.get( - "string", - account_id="string", + reference_id="reference_id", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "string", + reference_id="reference_id", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `reference_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.references.with_raw_response.get( - "", - account_id="string", + reference_id="", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py index f9d0bf7503f..fdc54e04cdd 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_behaviours.py @@ -23,14 +23,14 @@ class TestBehaviours: @parametrize def test_method_update(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: behaviour = client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", behaviors={ "foo": { "enabled": True, @@ -43,7 +43,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -54,7 +54,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.behaviours.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,7 +68,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "", + account_identifier="", ) @parametrize @@ -116,14 +116,14 @@ class TestAsyncBehaviours: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(BehaviourUpdateResponse, behaviour, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: behaviour = await async_client.zero_trust.risk_scoring.behaviours.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", behaviors={ "foo": { "enabled": True, @@ -136,7 +136,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.behaviours.with_streaming_response.update( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,7 +161,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.zero_trust.risk_scoring.behaviours.with_raw_response.update( - "", + account_identifier="", ) @parametrize diff --git a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py index c6fa43d9486..5ec6ae4e5ba 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_integrations.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_integrations.py @@ -26,7 +26,7 @@ class TestIntegrations: @parametrize def test_method_create(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -35,17 +35,17 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -58,7 +58,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) as response: @@ -82,8 +82,8 @@ def test_path_params_create(self, client: Cloudflare) -> None: @parametrize def test_method_update(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -92,19 +92,19 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -117,8 +117,8 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) as response: @@ -134,7 +134,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", active=True, tenant_url="https://example.com", @@ -142,8 +142,8 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "", - account_id="string", + integration_id="", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -152,7 +152,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[IntegrationListResponse], integration, path=["response"]) @@ -160,7 +160,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -172,7 +172,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -193,16 +193,16 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(object, integration, path=["response"]) @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -213,8 +213,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,29 +228,29 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "", - account_id="string", + integration_id="", + account_id="account_id", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: integration = client.zero_trust.risk_scoring.integrations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -261,8 +261,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.integrations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -276,14 +276,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "", - account_id="string", + integration_id="", + account_id="account_id", ) @@ -293,7 +293,7 @@ class TestAsyncIntegrations: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -302,17 +302,17 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationCreateResponse], integration, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) @@ -325,7 +325,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.create( - account_id="string", + account_id="account_id", integration_type="Okta", tenant_url="https://example.com", ) as response: @@ -349,8 +349,8 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -359,19 +359,19 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", - reference_id="string", + reference_id="reference_id", ) assert_matches_type(Optional[IntegrationUpdateResponse], integration, path=["response"]) @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -384,8 +384,8 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", active=True, tenant_url="https://example.com", ) as response: @@ -401,7 +401,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", active=True, tenant_url="https://example.com", @@ -409,8 +409,8 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.update( - "", - account_id="string", + integration_id="", + account_id="account_id", active=True, tenant_url="https://example.com", ) @@ -419,7 +419,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[IntegrationListResponse], integration, path=["response"]) @@ -427,7 +427,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -439,7 +439,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -460,16 +460,16 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(object, integration, path=["response"]) @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -480,8 +480,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -495,29 +495,29 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.delete( - "", - account_id="string", + integration_id="", + account_id="account_id", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.risk_scoring.integrations.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert_matches_type(Optional[IntegrationGetResponse], integration, path=["response"]) @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) assert response.is_closed is True @@ -528,8 +528,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.integrations.with_streaming_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - account_id="string", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -543,12 +543,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + integration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `integration_id` but received ''"): await async_client.zero_trust.risk_scoring.integrations.with_raw_response.get( - "", - account_id="string", + integration_id="", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/risk_scoring/test_summary.py b/tests/api_resources/zero_trust/risk_scoring/test_summary.py index 1ae273a5a8c..3ac6e4d59a1 100644 --- a/tests/api_resources/zero_trust/risk_scoring/test_summary.py +++ b/tests/api_resources/zero_trust/risk_scoring/test_summary.py @@ -20,14 +20,14 @@ class TestSummary: @parametrize def test_method_get(self, client: Cloudflare) -> None: summary = client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: summary = client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", page=0, @@ -38,7 +38,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.summary.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -49,7 +49,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.summary.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,7 +63,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.zero_trust.risk_scoring.summary.with_raw_response.get( - "", + account_identifier="", ) @@ -73,14 +73,14 @@ class TestAsyncSummary: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: summary = await async_client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(SummaryGetResponse, summary, path=["response"]) @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: summary = await async_client.zero_trust.risk_scoring.summary.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", page=0, @@ -91,7 +91,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.summary.with_raw_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert response.is_closed is True @@ -102,7 +102,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.summary.with_streaming_response.get( - "023e105f4ecef8ad9ca31a8372d0c353", + account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,5 +116,5 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.zero_trust.risk_scoring.summary.with_raw_response.get( - "", + account_identifier="", ) diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py index 6b0adb03848..f814c7c80bc 100644 --- a/tests/api_resources/zero_trust/test_devices.py +++ b/tests/api_resources/zero_trust/test_devices.py @@ -59,7 +59,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: device = client.zero_trust.devices.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(DeviceGetResponse, device, path=["response"]) @@ -67,7 +67,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.devices.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -94,13 +94,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): client.zero_trust.devices.with_raw_response.get( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -149,7 +149,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.devices.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(DeviceGetResponse, device, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -169,7 +169,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.devices.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -184,12 +184,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.devices.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + device_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `device_id` but received ''"): await async_client.zero_trust.devices.with_raw_response.get( - "", + device_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index 60410f707a6..c31274cd210 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -29,7 +29,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -49,13 +49,13 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -68,7 +68,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -83,7 +83,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -109,7 +109,7 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -119,7 +119,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -137,13 +137,13 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -156,7 +156,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -171,7 +171,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,7 +197,7 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -207,7 +207,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -221,13 +221,13 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -240,7 +240,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -255,7 +255,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -281,7 +281,7 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -291,7 +291,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -305,13 +305,13 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -324,7 +324,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -339,7 +339,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,7 +365,7 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -375,7 +375,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -391,13 +391,13 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -410,7 +410,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -425,7 +425,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -451,7 +451,7 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -461,7 +461,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -478,13 +478,13 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -497,7 +497,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -512,7 +512,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -538,7 +538,7 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -548,7 +548,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -562,13 +562,13 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -581,7 +581,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -596,7 +596,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -622,7 +622,7 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -632,7 +632,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -652,13 +652,13 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -671,7 +671,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -686,7 +686,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -712,7 +712,7 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -722,7 +722,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -740,13 +740,13 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -759,7 +759,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -774,7 +774,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -800,7 +800,7 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -810,7 +810,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -827,13 +827,13 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -846,7 +846,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -861,7 +861,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -887,7 +887,7 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -897,7 +897,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -914,13 +914,13 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -933,7 +933,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -948,7 +948,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -974,7 +974,7 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -984,7 +984,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -997,16 +997,16 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -1016,13 +1016,13 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1035,7 +1035,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1050,7 +1050,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1076,7 +1076,7 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -1086,7 +1086,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1100,13 +1100,13 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1119,7 +1119,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1134,7 +1134,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1160,7 +1160,7 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -1170,7 +1170,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1181,13 +1181,13 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1200,7 +1200,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1215,7 +1215,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1241,18 +1241,18 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1260,7 +1260,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1273,13 +1273,13 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1289,11 +1289,11 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1305,11 +1305,11 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1324,16 +1324,16 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1342,22 +1342,22 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1365,7 +1365,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1376,13 +1376,13 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1392,11 +1392,11 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1408,11 +1408,11 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1427,16 +1427,16 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1445,22 +1445,22 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1468,20 +1468,20 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1491,11 +1491,11 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1507,11 +1507,11 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1526,16 +1526,16 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1544,22 +1544,22 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1567,20 +1567,20 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1590,11 +1590,11 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1606,11 +1606,11 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1625,16 +1625,16 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1643,22 +1643,22 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1666,7 +1666,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1675,13 +1675,13 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1691,11 +1691,11 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1707,11 +1707,11 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1726,16 +1726,16 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1744,22 +1744,22 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1767,7 +1767,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1777,13 +1777,13 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1793,11 +1793,11 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1809,11 +1809,11 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1828,16 +1828,16 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1846,22 +1846,22 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1869,20 +1869,20 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1892,11 +1892,11 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -1908,11 +1908,11 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1927,16 +1927,16 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -1945,22 +1945,22 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1968,7 +1968,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -1981,13 +1981,13 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -1997,11 +1997,11 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2013,11 +2013,11 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2032,16 +2032,16 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2050,22 +2050,22 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2073,7 +2073,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -2084,13 +2084,13 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2100,11 +2100,11 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N @parametrize def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2116,11 +2116,11 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2135,16 +2135,16 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2153,22 +2153,22 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2176,7 +2176,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -2186,13 +2186,13 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2202,11 +2202,11 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2218,11 +2218,11 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2237,16 +2237,16 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2255,22 +2255,22 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2278,7 +2278,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -2288,13 +2288,13 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2304,11 +2304,11 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2320,11 +2320,11 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2339,16 +2339,16 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2357,22 +2357,22 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2380,22 +2380,22 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "attributes": ["group", "department_code", "divison"], "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -2405,13 +2405,13 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2421,11 +2421,11 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2437,11 +2437,11 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2456,16 +2456,16 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2474,22 +2474,22 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2497,20 +2497,20 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2520,11 +2520,11 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2536,11 +2536,11 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2555,16 +2555,16 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2573,22 +2573,22 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2596,17 +2596,17 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2616,11 +2616,11 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> @parametrize def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2632,11 +2632,11 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2651,16 +2651,16 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -2669,18 +2669,18 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -2688,7 +2688,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -2696,7 +2696,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2708,7 +2708,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2728,15 +2728,15 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_delete(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -2744,8 +2744,8 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_method_delete_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -2753,8 +2753,8 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -2766,8 +2766,8 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2782,28 +2782,28 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_get(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2811,8 +2811,8 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2820,8 +2820,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -2833,8 +2833,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2849,20 +2849,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @@ -2876,7 +2876,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2896,13 +2896,13 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -2915,7 +2915,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -2930,7 +2930,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2956,7 +2956,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -2966,7 +2966,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2984,13 +2984,13 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3003,7 +3003,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3018,7 +3018,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3044,7 +3044,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3054,7 +3054,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3068,13 +3068,13 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3087,7 +3087,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3102,7 +3102,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3128,7 +3128,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3138,7 +3138,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3152,13 +3152,13 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3171,7 +3171,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3186,7 +3186,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3212,7 +3212,7 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3222,7 +3222,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3238,13 +3238,13 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3257,7 +3257,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3272,7 +3272,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3298,7 +3298,7 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3308,7 +3308,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3325,13 +3325,13 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3344,7 +3344,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3359,7 +3359,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3385,7 +3385,7 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3395,7 +3395,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3409,13 +3409,13 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3428,7 +3428,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3443,7 +3443,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3469,7 +3469,7 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3479,7 +3479,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3499,13 +3499,13 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3518,7 +3518,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3533,7 +3533,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3559,7 +3559,7 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3569,7 +3569,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3587,13 +3587,13 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3606,7 +3606,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3621,7 +3621,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3647,7 +3647,7 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3657,7 +3657,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3674,13 +3674,13 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3693,7 +3693,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3708,7 +3708,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3734,7 +3734,7 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3744,7 +3744,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3761,13 +3761,13 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3780,7 +3780,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3795,7 +3795,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3821,7 +3821,7 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3831,7 +3831,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3844,16 +3844,16 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -3863,13 +3863,13 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3882,7 +3882,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3897,7 +3897,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3923,7 +3923,7 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -3933,7 +3933,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3947,13 +3947,13 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -3966,7 +3966,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -3981,7 +3981,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4007,7 +4007,7 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -4017,7 +4017,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4028,13 +4028,13 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4047,7 +4047,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4062,7 +4062,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4088,18 +4088,18 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4107,7 +4107,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_1(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4120,13 +4120,13 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4136,11 +4136,11 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4152,11 +4152,11 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4171,16 +4171,16 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4189,22 +4189,22 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4212,7 +4212,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4223,13 +4223,13 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4239,11 +4239,11 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4255,11 +4255,11 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4274,16 +4274,16 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4292,22 +4292,22 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4315,20 +4315,20 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_3(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4338,11 +4338,11 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4354,11 +4354,11 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4373,16 +4373,16 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4391,22 +4391,22 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4414,20 +4414,20 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_4(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4437,11 +4437,11 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4453,11 +4453,11 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4472,16 +4472,16 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4490,22 +4490,22 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4513,7 +4513,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4522,13 +4522,13 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4538,11 +4538,11 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4554,11 +4554,11 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4573,16 +4573,16 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4591,22 +4591,22 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4614,7 +4614,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4624,13 +4624,13 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4640,11 +4640,11 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4656,11 +4656,11 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4675,16 +4675,16 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4693,22 +4693,22 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4716,20 +4716,20 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4739,11 +4739,11 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4755,11 +4755,11 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4774,16 +4774,16 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4792,22 +4792,22 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4815,7 +4815,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4828,13 +4828,13 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4844,11 +4844,11 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4860,11 +4860,11 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4879,16 +4879,16 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -4897,22 +4897,22 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4920,7 +4920,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -4931,13 +4931,13 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -4947,11 +4947,11 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn @parametrize async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -4963,11 +4963,11 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar @parametrize async def test_streaming_response_update_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4982,16 +4982,16 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5000,22 +5000,22 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5023,7 +5023,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -5033,13 +5033,13 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5049,11 +5049,11 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy @parametrize async def test_raw_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5065,11 +5065,11 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5084,16 +5084,16 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl async def test_path_params_update_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5102,22 +5102,22 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5125,7 +5125,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", @@ -5135,13 +5135,13 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5151,11 +5151,11 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy @parametrize async def test_raw_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5167,11 +5167,11 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5186,16 +5186,16 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl async def test_path_params_update_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5204,22 +5204,22 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5227,22 +5227,22 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "attributes": ["group", "department_code", "divison"], "email_attribute_name": "Email", "header_attributes": [ { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, { - "attribute_name": "string", - "header_name": "string", + "attribute_name": "attribute_name", + "header_name": "header_name", }, ], "idp_public_certs": ["string", "string", "string"], @@ -5252,13 +5252,13 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5268,11 +5268,11 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy @parametrize async def test_raw_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5284,11 +5284,11 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5303,16 +5303,16 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl async def test_path_params_update_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5321,22 +5321,22 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5344,20 +5344,20 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={ "client_id": "", "client_secret": "", }, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5367,11 +5367,11 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy @parametrize async def test_raw_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5383,11 +5383,11 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5402,16 +5402,16 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl async def test_path_params_update_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5420,22 +5420,22 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5443,17 +5443,17 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_update_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", scim_config={ "enabled": True, "group_member_deprovision": True, "seat_deprovision": True, - "secret": "string", + "secret": "secret", "user_deprovision": True, }, ) @@ -5463,11 +5463,11 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy @parametrize async def test_raw_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5479,11 +5479,11 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla @parametrize async def test_streaming_response_update_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5498,16 +5498,16 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl async def test_path_params_update_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "", + identity_provider_id="", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", @@ -5516,18 +5516,18 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.update( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", config={}, name="Widget Corps IDP", type="onetimepin", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -5535,7 +5535,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( - account_id="string", + account_id="account_id", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -5543,7 +5543,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -5555,7 +5555,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5575,15 +5575,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -5591,8 +5591,8 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -5600,8 +5600,8 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -5613,8 +5613,8 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5629,28 +5629,28 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.delete( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5658,8 +5658,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5667,8 +5667,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) assert response.is_closed is True @@ -5680,8 +5680,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.identity_providers.with_streaming_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5696,18 +5696,18 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identity_provider_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( - "", - account_id="string", + identity_provider_id="", + account_id="account_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.identity_providers.with_raw_response.get( - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", - account_id="string", + identity_provider_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index ef9c6c862c3..949d07f5e7e 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -36,7 +36,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -60,7 +60,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -74,7 +74,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,14 +98,14 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_update(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -113,7 +113,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -141,7 +141,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -153,7 +153,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.update( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -173,14 +173,14 @@ def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize def test_method_list(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -188,7 +188,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -196,7 +196,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -208,7 +208,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,7 +228,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -236,7 +236,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: def test_method_revoke_users(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -245,7 +245,7 @@ def test_method_revoke_users(self, client: Cloudflare) -> None: def test_method_revoke_users_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -254,7 +254,7 @@ def test_method_revoke_users_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_revoke_users(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -267,7 +267,7 @@ def test_raw_response_revoke_users(self, client: Cloudflare) -> None: def test_streaming_response_revoke_users(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -289,7 +289,7 @@ def test_path_params_revoke_users(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) @@ -302,7 +302,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -312,7 +312,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare organization = await async_client.zero_trust.organizations.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -336,7 +336,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -350,7 +350,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.organizations.with_streaming_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -374,14 +374,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.organizations.with_raw_response.create( auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -389,7 +389,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( - account_id="string", + account_id="account_id", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -417,7 +417,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -429,7 +429,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.update( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -449,14 +449,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.update( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -464,7 +464,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -472,7 +472,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -484,7 +484,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.list( - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -504,7 +504,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.list( - account_id="string", + account_id="account_id", ) @pytest.mark.skip(reason="TODO: investigate broken test") @@ -512,7 +512,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: async def test_method_revoke_users(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -521,7 +521,7 @@ async def test_method_revoke_users(self, async_client: AsyncCloudflare) -> None: async def test_method_revoke_users_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -530,7 +530,7 @@ async def test_method_revoke_users_with_all_params(self, async_client: AsyncClou async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) assert response.is_closed is True @@ -543,7 +543,7 @@ async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> async def test_streaming_response_revoke_users(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -565,5 +565,5 @@ async def test_path_params_revoke_users(self, async_client: AsyncCloudflare) -> with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", - account_id="string", + account_id="account_id", ) diff --git a/tests/api_resources/zero_trust/test_risk_scoring.py b/tests/api_resources/zero_trust/test_risk_scoring.py index 7e5ce3f6646..bb96f170413 100644 --- a/tests/api_resources/zero_trust/test_risk_scoring.py +++ b/tests/api_resources/zero_trust/test_risk_scoring.py @@ -20,7 +20,7 @@ class TestRiskScoring: @parametrize def test_method_get(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", @@ -40,7 +40,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -52,7 +52,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.with_streaming_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -67,20 +67,20 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.risk_scoring.with_raw_response.get( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_reset(self, client: Cloudflare) -> None: risk_scoring = client.zero_trust.risk_scoring.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) @@ -88,7 +88,7 @@ def test_method_reset(self, client: Cloudflare) -> None: @parametrize def test_raw_response_reset(self, client: Cloudflare) -> None: response = client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -100,7 +100,7 @@ def test_raw_response_reset(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_reset(self, client: Cloudflare) -> None: with client.zero_trust.risk_scoring.with_streaming_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -115,13 +115,13 @@ def test_streaming_response_reset(self, client: Cloudflare) -> None: def test_path_params_reset(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): client.zero_trust.risk_scoring.with_raw_response.reset( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -132,7 +132,7 @@ class TestAsyncRiskScoring: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringGetResponse, risk_scoring, path=["response"]) @@ -140,7 +140,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", direction="desc", order_by="timestamp", @@ -152,7 +152,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -164,7 +164,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.with_streaming_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -179,20 +179,20 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.get( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.get( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_reset(self, async_client: AsyncCloudflare) -> None: risk_scoring = await async_client.zero_trust.risk_scoring.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(RiskScoringResetResponse, risk_scoring, path=["response"]) @@ -200,7 +200,7 @@ async def test_method_reset(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_reset(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -212,7 +212,7 @@ async def test_raw_response_reset(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_reset(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.risk_scoring.with_streaming_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -227,12 +227,12 @@ async def test_streaming_response_reset(self, async_client: AsyncCloudflare) -> async def test_path_params_reset(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.reset( - "f2108713-1206-4e84-8b80-0e71a6a1c67b", + user_id="f2108713-1206-4e84-8b80-0e71a6a1c67b", account_identifier="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `user_id` but received ''"): await async_client.zero_trust.risk_scoring.with_raw_response.reset( - "", + user_id="", account_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zero_trust/test_tunnels.py b/tests/api_resources/zero_trust/test_tunnels.py index c00bfff850e..80415ba60bf 100644 --- a/tests/api_resources/zero_trust/test_tunnels.py +++ b/tests/api_resources/zero_trust/test_tunnels.py @@ -131,7 +131,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: @parametrize def test_method_delete(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) @@ -139,7 +139,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -151,7 +151,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -166,20 +166,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_edit(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) @@ -187,7 +187,7 @@ def test_method_edit(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -197,7 +197,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -209,7 +209,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -224,20 +224,20 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: tunnel = client.zero_trust.tunnels.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) @@ -245,7 +245,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -257,7 +257,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -272,13 +272,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -392,7 +392,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelDeleteResponse, tunnel, path=["response"]) @@ -400,7 +400,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -412,7 +412,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -427,20 +427,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelEditResponse, tunnel, path=["response"]) @@ -448,7 +448,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", name="blog", tunnel_secret="AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg=", @@ -458,7 +458,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -470,7 +470,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -485,20 +485,20 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.edit( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.edit( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: tunnel = await async_client.zero_trust.tunnels.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TunnelGetResponse, tunnel, path=["response"]) @@ -506,7 +506,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -518,7 +518,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -533,12 +533,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_configurations.py b/tests/api_resources/zero_trust/tunnels/test_configurations.py index 66e8d63db41..91d499a1045 100644 --- a/tests/api_resources/zero_trust/tunnels/test_configurations.py +++ b/tests/api_resources/zero_trust/tunnels/test_configurations.py @@ -23,7 +23,7 @@ class TestConfigurations: @parametrize def test_method_update(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) @@ -31,7 +31,7 @@ def test_method_update(self, client: Cloudflare) -> None: @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "ingress": [ @@ -41,19 +41,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -66,19 +66,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -91,19 +91,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -115,19 +115,19 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -139,7 +139,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -151,7 +151,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.configurations.with_streaming_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -166,20 +166,20 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.configurations.with_raw_response.update( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: configuration = client.zero_trust.tunnels.configurations.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -187,7 +187,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -199,7 +199,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.configurations.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -214,13 +214,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.configurations.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -231,7 +231,7 @@ class TestAsyncConfigurations: @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationUpdateResponse, configuration, path=["response"]) @@ -239,7 +239,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", config={ "ingress": [ @@ -249,19 +249,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -274,19 +274,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -299,19 +299,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -323,19 +323,19 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "access": { "aud_tag": ["string", "string", "string"], "required": True, - "team_name": "string", + "team_name": "teamName", }, - "ca_pool": "string", + "ca_pool": "caPool", "connect_timeout": 0, "disable_chunked_encoding": True, "http2_origin": True, - "http_host_header": "string", + "http_host_header": "httpHostHeader", "keep_alive_connections": 0, "keep_alive_timeout": 0, "no_happy_eyeballs": True, "no_tls_verify": True, - "origin_server_name": "string", - "proxy_type": "string", + "origin_server_name": "originServerName", + "proxy_type": "proxyType", "tcp_keep_alive": 0, "tls_timeout": 0, }, @@ -347,7 +347,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -359,7 +359,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.configurations.with_streaming_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -374,20 +374,20 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.configurations.with_raw_response.update( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.configurations.with_raw_response.update( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: configuration = await async_client.zero_trust.tunnels.configurations.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConfigurationGetResponse, configuration, path=["response"]) @@ -395,7 +395,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -407,7 +407,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.configurations.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -422,12 +422,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.configurations.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.configurations.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_connections.py b/tests/api_resources/zero_trust/tunnels/test_connections.py index fd71588c59b..a840ee0c72a 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connections.py +++ b/tests/api_resources/zero_trust/tunnels/test_connections.py @@ -20,7 +20,7 @@ class TestConnections: @parametrize def test_method_delete(self, client: Cloudflare) -> None: connection = client.zero_trust.tunnels.connections.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) @@ -28,7 +28,7 @@ def test_method_delete(self, client: Cloudflare) -> None: @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -40,7 +40,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connections.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -55,20 +55,20 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize def test_method_get(self, client: Cloudflare) -> None: connection = client.zero_trust.tunnels.connections.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) @@ -76,7 +76,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -88,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connections.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -103,13 +103,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connections.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -120,7 +120,7 @@ class TestAsyncConnections: @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: connection = await async_client.zero_trust.tunnels.connections.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(ConnectionDeleteResponse, connection, path=["response"]) @@ -128,7 +128,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -140,7 +140,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connections.with_streaming_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -155,20 +155,20 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.delete( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.delete( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connection = await async_client.zero_trust.tunnels.connections.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(Optional[ConnectionGetResponse], connection, path=["response"]) @@ -176,7 +176,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -188,7 +188,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connections.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -203,12 +203,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connections.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_connectors.py b/tests/api_resources/zero_trust/tunnels/test_connectors.py index ffd3b01b23b..639188dd181 100644 --- a/tests/api_resources/zero_trust/tunnels/test_connectors.py +++ b/tests/api_resources/zero_trust/tunnels/test_connectors.py @@ -20,7 +20,7 @@ class TestConnectors: @parametrize def test_method_get(self, client: Cloudflare) -> None: connector = client.zero_trust.tunnels.connectors.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -29,7 +29,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -42,7 +42,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.connectors.with_streaming_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: @@ -58,21 +58,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): client.zero_trust.tunnels.connectors.with_raw_response.get( - "", + connector_id="", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -84,7 +84,7 @@ class TestAsyncConnectors: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: connector = await async_client.zero_trust.tunnels.connectors.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) @@ -106,7 +106,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.connectors.with_streaming_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) as response: @@ -122,21 +122,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "1bedc50d-42b3-473c-b108-ff3d10c0d925", + connector_id="1bedc50d-42b3-473c-b108-ff3d10c0d925", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `connector_id` but received ''"): await async_client.zero_trust.tunnels.connectors.with_raw_response.get( - "", + connector_id="", account_id="699d98642c564d2e855e9661899b7252", tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", ) diff --git a/tests/api_resources/zero_trust/tunnels/test_management.py b/tests/api_resources/zero_trust/tunnels/test_management.py index 7679e42dcb8..9bb75d7bc69 100644 --- a/tests/api_resources/zero_trust/tunnels/test_management.py +++ b/tests/api_resources/zero_trust/tunnels/test_management.py @@ -20,7 +20,7 @@ class TestManagement: @parametrize def test_method_create(self, client: Cloudflare) -> None: management = client.zero_trust.tunnels.management.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -42,7 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.management.with_streaming_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) as response: @@ -58,14 +58,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", resources=["logs"], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.management.with_raw_response.create( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -77,7 +77,7 @@ class TestAsyncManagement: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: management = await async_client.zero_trust.tunnels.management.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -86,7 +86,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) @@ -99,7 +99,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.management.with_streaming_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) as response: @@ -115,14 +115,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.management.with_raw_response.create( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", resources=["logs"], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.management.with_raw_response.create( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", resources=["logs"], ) diff --git a/tests/api_resources/zero_trust/tunnels/test_token.py b/tests/api_resources/zero_trust/tunnels/test_token.py index 4a4ecd88189..ee47c8bf24e 100644 --- a/tests/api_resources/zero_trust/tunnels/test_token.py +++ b/tests/api_resources/zero_trust/tunnels/test_token.py @@ -20,7 +20,7 @@ class TestToken: @parametrize def test_method_get(self, client: Cloudflare) -> None: token = client.zero_trust.tunnels.token.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TokenGetResponse, token, path=["response"]) @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.tunnels.token.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -55,13 +55,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): client.zero_trust.tunnels.token.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) @@ -72,7 +72,7 @@ class TestAsyncToken: @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: token = await async_client.zero_trust.tunnels.token.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) assert_matches_type(TokenGetResponse, token, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) @@ -92,7 +92,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zero_trust.tunnels.token.with_streaming_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) as response: assert not response.is_closed @@ -107,12 +107,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.zero_trust.tunnels.token.with_raw_response.get( - "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", + tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415", account_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `tunnel_id` but received ''"): await async_client.zero_trust.tunnels.token.with_raw_response.get( - "", + tunnel_id="", account_id="699d98642c564d2e855e9661899b7252", ) diff --git a/tests/api_resources/zones/test_holds.py b/tests/api_resources/zones/test_holds.py index cd4b3671938..c49066aee53 100644 --- a/tests/api_resources/zones/test_holds.py +++ b/tests/api_resources/zones/test_holds.py @@ -74,7 +74,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_method_delete_with_all_params(self, client: Cloudflare) -> None: hold = client.zones.holds.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - hold_after="string", + hold_after="hold_after", ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) @@ -208,7 +208,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare) -> None: hold = await async_client.zones.holds.delete( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - hold_after="string", + hold_after="hold_after", ) assert_matches_type(Optional[ZoneHold], hold, path=["response"]) diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py index f8af72165ec..6a113081a1c 100644 --- a/tests/api_resources/zones/test_settings.py +++ b/tests/api_resources/zones/test_settings.py @@ -23,7 +23,7 @@ class TestSettings: @parametrize def test_method_edit_overload_1(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -33,7 +33,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -47,7 +47,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -64,7 +64,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="0rtt", value="on", @@ -72,7 +72,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -81,7 +81,7 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_2(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -91,7 +91,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -105,7 +105,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -122,7 +122,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="advanced_ddos", value="on", @@ -130,7 +130,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -139,7 +139,7 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_3(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -149,7 +149,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -163,7 +163,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -180,7 +180,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_online", value="on", @@ -188,7 +188,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -197,7 +197,7 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_4(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -207,7 +207,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -221,7 +221,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -238,7 +238,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_use_https", value="on", @@ -246,7 +246,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -255,7 +255,7 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_5(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -265,7 +265,7 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -279,7 +279,7 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -296,7 +296,7 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_https_rewrites", value="on", @@ -304,7 +304,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -313,7 +313,7 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_6(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -323,7 +323,7 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -337,7 +337,7 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -354,7 +354,7 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="brotli", value="on", @@ -362,7 +362,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -371,7 +371,7 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_7(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -381,7 +381,7 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -395,7 +395,7 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -412,7 +412,7 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_cache_ttl", value=0, @@ -420,7 +420,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -429,7 +429,7 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_8(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -439,7 +439,7 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -453,7 +453,7 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -470,7 +470,7 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_check", value="on", @@ -478,7 +478,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -487,7 +487,7 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_9(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -497,7 +497,7 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -511,7 +511,7 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -528,7 +528,7 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cache_level", value="aggressive", @@ -536,7 +536,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -545,7 +545,7 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_10(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -555,7 +555,7 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -569,7 +569,7 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -586,7 +586,7 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="challenge_ttl", value=300, @@ -594,7 +594,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -603,7 +603,7 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_11(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -613,7 +613,7 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -627,7 +627,7 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -644,7 +644,7 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -652,7 +652,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -661,7 +661,7 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_12(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -671,7 +671,7 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -685,7 +685,7 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -702,7 +702,7 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cname_flattening", value="flatten_at_root", @@ -710,7 +710,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -719,7 +719,7 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_13(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -729,7 +729,7 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -743,7 +743,7 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -760,7 +760,7 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="development_mode", value="on", @@ -768,7 +768,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -777,7 +777,7 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_14(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -787,7 +787,7 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -801,7 +801,7 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -818,7 +818,7 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="early_hints", value="on", @@ -826,7 +826,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -835,7 +835,7 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_15(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -845,7 +845,7 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -859,7 +859,7 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -876,7 +876,7 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="edge_cache_ttl", value=30, @@ -884,7 +884,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -893,7 +893,7 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_16(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -903,7 +903,7 @@ def test_method_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -917,7 +917,7 @@ def test_raw_response_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -934,7 +934,7 @@ def test_streaming_response_edit_overload_16(self, client: Cloudflare) -> None: def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="email_obfuscation", value="on", @@ -942,7 +942,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -951,7 +951,7 @@ def test_path_params_edit_overload_16(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_17(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -961,7 +961,7 @@ def test_method_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -975,7 +975,7 @@ def test_raw_response_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -992,7 +992,7 @@ def test_streaming_response_edit_overload_17(self, client: Cloudflare) -> None: def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="h2_prioritization", value="on", @@ -1000,7 +1000,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -1009,7 +1009,7 @@ def test_path_params_edit_overload_17(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_18(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1019,7 +1019,7 @@ def test_method_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1033,7 +1033,7 @@ def test_raw_response_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1050,7 +1050,7 @@ def test_streaming_response_edit_overload_18(self, client: Cloudflare) -> None: def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="hotlink_protection", value="on", @@ -1058,7 +1058,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -1067,7 +1067,7 @@ def test_path_params_edit_overload_18(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_19(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1077,7 +1077,7 @@ def test_method_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1091,7 +1091,7 @@ def test_raw_response_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1108,7 +1108,7 @@ def test_streaming_response_edit_overload_19(self, client: Cloudflare) -> None: def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http2", value="on", @@ -1116,7 +1116,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -1125,7 +1125,7 @@ def test_path_params_edit_overload_19(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_20(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1135,7 +1135,7 @@ def test_method_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1149,7 +1149,7 @@ def test_raw_response_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1166,7 +1166,7 @@ def test_streaming_response_edit_overload_20(self, client: Cloudflare) -> None: def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http3", value="on", @@ -1174,7 +1174,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -1183,7 +1183,7 @@ def test_path_params_edit_overload_20(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_21(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1193,7 +1193,7 @@ def test_method_edit_overload_21(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1207,7 +1207,7 @@ def test_raw_response_edit_overload_21(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1224,7 +1224,7 @@ def test_streaming_response_edit_overload_21(self, client: Cloudflare) -> None: def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="image_resizing", value="on", @@ -1232,7 +1232,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -1241,7 +1241,7 @@ def test_path_params_edit_overload_21(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_22(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1251,7 +1251,7 @@ def test_method_edit_overload_22(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_22(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1265,7 +1265,7 @@ def test_raw_response_edit_overload_22(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_22(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1282,7 +1282,7 @@ def test_streaming_response_edit_overload_22(self, client: Cloudflare) -> None: def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ip_geolocation", value="on", @@ -1290,7 +1290,7 @@ def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -1299,7 +1299,7 @@ def test_path_params_edit_overload_22(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_23(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1309,7 +1309,7 @@ def test_method_edit_overload_23(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_23(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1323,7 +1323,7 @@ def test_raw_response_edit_overload_23(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_23(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1340,7 +1340,7 @@ def test_streaming_response_edit_overload_23(self, client: Cloudflare) -> None: def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ipv6", value="on", @@ -1348,7 +1348,7 @@ def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -1357,7 +1357,7 @@ def test_path_params_edit_overload_23(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_24(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1367,7 +1367,7 @@ def test_method_edit_overload_24(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_24(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1381,7 +1381,7 @@ def test_raw_response_edit_overload_24(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_24(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1398,7 +1398,7 @@ def test_streaming_response_edit_overload_24(self, client: Cloudflare) -> None: def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="max_upload", value=100, @@ -1406,7 +1406,7 @@ def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -1415,7 +1415,7 @@ def test_path_params_edit_overload_24(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_25(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1425,7 +1425,7 @@ def test_method_edit_overload_25(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_25(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1439,7 +1439,7 @@ def test_raw_response_edit_overload_25(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_25(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1456,7 +1456,7 @@ def test_streaming_response_edit_overload_25(self, client: Cloudflare) -> None: def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="min_tls_version", value="1.0", @@ -1464,7 +1464,7 @@ def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -1473,7 +1473,7 @@ def test_path_params_edit_overload_25(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_26(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1483,7 +1483,7 @@ def test_method_edit_overload_26(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_26(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={ @@ -1497,7 +1497,7 @@ def test_method_edit_with_all_params_overload_26(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_26(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1511,7 +1511,7 @@ def test_raw_response_edit_overload_26(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_26(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1528,7 +1528,7 @@ def test_streaming_response_edit_overload_26(self, client: Cloudflare) -> None: def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="minify", value={}, @@ -1536,7 +1536,7 @@ def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -1545,7 +1545,7 @@ def test_path_params_edit_overload_26(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_27(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1555,7 +1555,7 @@ def test_method_edit_overload_27(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_27(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1569,7 +1569,7 @@ def test_raw_response_edit_overload_27(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_27(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1586,7 +1586,7 @@ def test_streaming_response_edit_overload_27(self, client: Cloudflare) -> None: def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mirage", value="on", @@ -1594,7 +1594,7 @@ def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -1603,7 +1603,7 @@ def test_path_params_edit_overload_27(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_28(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1613,7 +1613,7 @@ def test_method_edit_overload_28(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_28(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={ @@ -1627,7 +1627,7 @@ def test_method_edit_with_all_params_overload_28(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_28(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1641,7 +1641,7 @@ def test_raw_response_edit_overload_28(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_28(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1658,7 +1658,7 @@ def test_streaming_response_edit_overload_28(self, client: Cloudflare) -> None: def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mobile_redirect", value={}, @@ -1666,7 +1666,7 @@ def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -1675,7 +1675,7 @@ def test_path_params_edit_overload_28(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_29(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1685,7 +1685,7 @@ def test_method_edit_overload_29(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_29(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={"enabled": False}, @@ -1695,7 +1695,7 @@ def test_method_edit_with_all_params_overload_29(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_29(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1709,7 +1709,7 @@ def test_raw_response_edit_overload_29(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_29(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1726,7 +1726,7 @@ def test_streaming_response_edit_overload_29(self, client: Cloudflare) -> None: def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="nel", value={}, @@ -1734,7 +1734,7 @@ def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -1743,7 +1743,7 @@ def test_path_params_edit_overload_29(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_30(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1753,7 +1753,7 @@ def test_method_edit_overload_30(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_30(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1767,7 +1767,7 @@ def test_raw_response_edit_overload_30(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_30(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1784,7 +1784,7 @@ def test_streaming_response_edit_overload_30(self, client: Cloudflare) -> None: def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_encryption", value="on", @@ -1792,7 +1792,7 @@ def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -1801,7 +1801,7 @@ def test_path_params_edit_overload_30(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_31(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1811,7 +1811,7 @@ def test_method_edit_overload_31(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_31(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1825,7 +1825,7 @@ def test_raw_response_edit_overload_31(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_31(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1842,7 +1842,7 @@ def test_streaming_response_edit_overload_31(self, client: Cloudflare) -> None: def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_onion", value="on", @@ -1850,7 +1850,7 @@ def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -1859,7 +1859,7 @@ def test_path_params_edit_overload_31(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_32(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1869,7 +1869,7 @@ def test_method_edit_overload_32(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_32(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1883,7 +1883,7 @@ def test_raw_response_edit_overload_32(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_32(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1900,7 +1900,7 @@ def test_streaming_response_edit_overload_32(self, client: Cloudflare) -> None: def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="orange_to_orange", value="on", @@ -1908,7 +1908,7 @@ def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -1917,7 +1917,7 @@ def test_path_params_edit_overload_32(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_33(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1927,7 +1927,7 @@ def test_method_edit_overload_33(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_33(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1941,7 +1941,7 @@ def test_raw_response_edit_overload_33(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_33(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1958,7 +1958,7 @@ def test_streaming_response_edit_overload_33(self, client: Cloudflare) -> None: def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="origin_error_page_pass_thru", value="on", @@ -1966,7 +1966,7 @@ def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -1975,7 +1975,7 @@ def test_path_params_edit_overload_33(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_34(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -1985,7 +1985,7 @@ def test_method_edit_overload_34(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_34(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -1999,7 +1999,7 @@ def test_raw_response_edit_overload_34(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_34(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -2016,7 +2016,7 @@ def test_streaming_response_edit_overload_34(self, client: Cloudflare) -> None: def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="polish", value="off", @@ -2024,7 +2024,7 @@ def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -2033,7 +2033,7 @@ def test_path_params_edit_overload_34(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_35(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2043,7 +2043,7 @@ def test_method_edit_overload_35(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_35(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2057,7 +2057,7 @@ def test_raw_response_edit_overload_35(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_35(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2074,7 +2074,7 @@ def test_streaming_response_edit_overload_35(self, client: Cloudflare) -> None: def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="prefetch_preload", value="on", @@ -2082,7 +2082,7 @@ def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -2091,7 +2091,7 @@ def test_path_params_edit_overload_35(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_36(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2101,7 +2101,7 @@ def test_method_edit_overload_36(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_36(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2115,7 +2115,7 @@ def test_raw_response_edit_overload_36(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_36(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2132,7 +2132,7 @@ def test_streaming_response_edit_overload_36(self, client: Cloudflare) -> None: def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="proxy_read_timeout", value=0, @@ -2140,7 +2140,7 @@ def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -2149,7 +2149,7 @@ def test_path_params_edit_overload_36(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_37(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2159,7 +2159,7 @@ def test_method_edit_overload_37(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_37(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2173,7 +2173,7 @@ def test_raw_response_edit_overload_37(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_37(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2190,7 +2190,7 @@ def test_streaming_response_edit_overload_37(self, client: Cloudflare) -> None: def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="pseudo_ipv4", value="off", @@ -2198,7 +2198,7 @@ def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -2207,7 +2207,7 @@ def test_path_params_edit_overload_37(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_38(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2217,7 +2217,7 @@ def test_method_edit_overload_38(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_38(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2231,7 +2231,7 @@ def test_raw_response_edit_overload_38(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_38(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2248,7 +2248,7 @@ def test_streaming_response_edit_overload_38(self, client: Cloudflare) -> None: def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="replace_insecure_js", value="on", @@ -2256,7 +2256,7 @@ def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -2265,7 +2265,7 @@ def test_path_params_edit_overload_38(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_39(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2275,7 +2275,7 @@ def test_method_edit_overload_39(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_39(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2289,7 +2289,7 @@ def test_raw_response_edit_overload_39(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_39(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2306,7 +2306,7 @@ def test_streaming_response_edit_overload_39(self, client: Cloudflare) -> None: def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="response_buffering", value="on", @@ -2314,7 +2314,7 @@ def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -2323,7 +2323,7 @@ def test_path_params_edit_overload_39(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_40(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2333,7 +2333,7 @@ def test_method_edit_overload_40(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_40(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2347,7 +2347,7 @@ def test_raw_response_edit_overload_40(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_40(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2364,7 +2364,7 @@ def test_streaming_response_edit_overload_40(self, client: Cloudflare) -> None: def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="rocket_loader", value="on", @@ -2372,7 +2372,7 @@ def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -2381,7 +2381,7 @@ def test_path_params_edit_overload_40(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_41(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2398,7 +2398,7 @@ def test_method_edit_overload_41(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_41(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2419,7 +2419,7 @@ def test_raw_response_edit_overload_41(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_41(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2443,7 +2443,7 @@ def test_streaming_response_edit_overload_41(self, client: Cloudflare) -> None: def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_platform_optimization", value={ @@ -2458,7 +2458,7 @@ def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -2474,7 +2474,7 @@ def test_path_params_edit_overload_41(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_42(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2484,7 +2484,7 @@ def test_method_edit_overload_42(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={ @@ -2502,7 +2502,7 @@ def test_method_edit_with_all_params_overload_42(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_42(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2516,7 +2516,7 @@ def test_raw_response_edit_overload_42(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_42(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2533,7 +2533,7 @@ def test_streaming_response_edit_overload_42(self, client: Cloudflare) -> None: def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_header", value={}, @@ -2541,7 +2541,7 @@ def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -2550,7 +2550,7 @@ def test_path_params_edit_overload_42(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_43(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2560,7 +2560,7 @@ def test_method_edit_overload_43(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_43(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2574,7 +2574,7 @@ def test_raw_response_edit_overload_43(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_43(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2591,7 +2591,7 @@ def test_streaming_response_edit_overload_43(self, client: Cloudflare) -> None: def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_level", value="off", @@ -2599,7 +2599,7 @@ def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -2608,7 +2608,7 @@ def test_path_params_edit_overload_43(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_44(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2618,7 +2618,7 @@ def test_method_edit_overload_44(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_44(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2632,7 +2632,7 @@ def test_raw_response_edit_overload_44(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_44(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2649,7 +2649,7 @@ def test_streaming_response_edit_overload_44(self, client: Cloudflare) -> None: def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="server_side_exclude", value="on", @@ -2657,7 +2657,7 @@ def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -2666,7 +2666,7 @@ def test_path_params_edit_overload_44(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_45(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2676,7 +2676,7 @@ def test_method_edit_overload_45(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_45(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2690,7 +2690,7 @@ def test_raw_response_edit_overload_45(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_45(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2707,7 +2707,7 @@ def test_streaming_response_edit_overload_45(self, client: Cloudflare) -> None: def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sha1_support", value="on", @@ -2715,7 +2715,7 @@ def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -2724,7 +2724,7 @@ def test_path_params_edit_overload_45(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_46(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2734,7 +2734,7 @@ def test_method_edit_overload_46(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_46(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2748,7 +2748,7 @@ def test_raw_response_edit_overload_46(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_46(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2765,7 +2765,7 @@ def test_streaming_response_edit_overload_46(self, client: Cloudflare) -> None: def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sort_query_string_for_cache", value="on", @@ -2773,7 +2773,7 @@ def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -2782,7 +2782,7 @@ def test_path_params_edit_overload_46(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_47(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2792,7 +2792,7 @@ def test_method_edit_overload_47(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_47(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2806,7 +2806,7 @@ def test_raw_response_edit_overload_47(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_47(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2823,7 +2823,7 @@ def test_streaming_response_edit_overload_47(self, client: Cloudflare) -> None: def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ssl", value="off", @@ -2831,7 +2831,7 @@ def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -2840,7 +2840,7 @@ def test_path_params_edit_overload_47(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_48(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -2848,7 +2848,7 @@ def test_method_edit_overload_48(self, client: Cloudflare) -> None: @parametrize def test_method_edit_with_all_params_overload_48(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl_recommender", enabled=True, @@ -2858,7 +2858,7 @@ def test_method_edit_with_all_params_overload_48(self, client: Cloudflare) -> No @parametrize def test_raw_response_edit_overload_48(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -2870,7 +2870,7 @@ def test_raw_response_edit_overload_48(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_48(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -2885,20 +2885,20 @@ def test_streaming_response_edit_overload_48(self, client: Cloudflare) -> None: def test_path_params_edit_overload_48(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize def test_method_edit_overload_49(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2908,7 +2908,7 @@ def test_method_edit_overload_49(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_49(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2922,7 +2922,7 @@ def test_raw_response_edit_overload_49(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_49(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2939,7 +2939,7 @@ def test_streaming_response_edit_overload_49(self, client: Cloudflare) -> None: def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_2_only", value="on", @@ -2947,7 +2947,7 @@ def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -2956,7 +2956,7 @@ def test_path_params_edit_overload_49(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_50(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -2966,7 +2966,7 @@ def test_method_edit_overload_50(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_50(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -2980,7 +2980,7 @@ def test_raw_response_edit_overload_50(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_50(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -2997,7 +2997,7 @@ def test_streaming_response_edit_overload_50(self, client: Cloudflare) -> None: def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_3", value="on", @@ -3005,7 +3005,7 @@ def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -3014,7 +3014,7 @@ def test_path_params_edit_overload_50(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_51(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3024,7 +3024,7 @@ def test_method_edit_overload_51(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_51(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3038,7 +3038,7 @@ def test_raw_response_edit_overload_51(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_51(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3055,7 +3055,7 @@ def test_streaming_response_edit_overload_51(self, client: Cloudflare) -> None: def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_client_auth", value="on", @@ -3063,7 +3063,7 @@ def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -3072,7 +3072,7 @@ def test_path_params_edit_overload_51(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_52(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3082,7 +3082,7 @@ def test_method_edit_overload_52(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_52(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3096,7 +3096,7 @@ def test_raw_response_edit_overload_52(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_52(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3113,7 +3113,7 @@ def test_streaming_response_edit_overload_52(self, client: Cloudflare) -> None: def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="true_client_ip_header", value="on", @@ -3121,7 +3121,7 @@ def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -3130,7 +3130,7 @@ def test_path_params_edit_overload_52(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_53(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3140,7 +3140,7 @@ def test_method_edit_overload_53(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_53(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3154,7 +3154,7 @@ def test_raw_response_edit_overload_53(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_53(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3171,7 +3171,7 @@ def test_streaming_response_edit_overload_53(self, client: Cloudflare) -> None: def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="waf", value="on", @@ -3179,7 +3179,7 @@ def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -3188,7 +3188,7 @@ def test_path_params_edit_overload_53(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_54(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3198,7 +3198,7 @@ def test_method_edit_overload_54(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_54(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3212,7 +3212,7 @@ def test_raw_response_edit_overload_54(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_54(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3229,7 +3229,7 @@ def test_streaming_response_edit_overload_54(self, client: Cloudflare) -> None: def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="webp", value="on", @@ -3237,7 +3237,7 @@ def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -3246,7 +3246,7 @@ def test_path_params_edit_overload_54(self, client: Cloudflare) -> None: @parametrize def test_method_edit_overload_55(self, client: Cloudflare) -> None: setting = client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3256,7 +3256,7 @@ def test_method_edit_overload_55(self, client: Cloudflare) -> None: @parametrize def test_raw_response_edit_overload_55(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3270,7 +3270,7 @@ def test_raw_response_edit_overload_55(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_edit_overload_55(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3287,7 +3287,7 @@ def test_streaming_response_edit_overload_55(self, client: Cloudflare) -> None: def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="websockets", value="on", @@ -3295,7 +3295,7 @@ def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -3304,7 +3304,7 @@ def test_path_params_edit_overload_55(self, client: Cloudflare) -> None: @parametrize def test_method_get(self, client: Cloudflare) -> None: setting = client.zones.settings.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -3312,7 +3312,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3324,7 +3324,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zones.settings.with_streaming_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -3339,13 +3339,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): client.zones.settings.with_raw_response.get( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -3356,7 +3356,7 @@ class TestAsyncSettings: @parametrize async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3366,7 +3366,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3380,7 +3380,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3397,7 +3397,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="0rtt", value="on", @@ -3405,7 +3405,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="0rtt", value="on", @@ -3414,7 +3414,7 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3424,7 +3424,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3438,7 +3438,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3455,7 +3455,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="advanced_ddos", value="on", @@ -3463,7 +3463,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="advanced_ddos", value="on", @@ -3472,7 +3472,7 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3482,7 +3482,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3496,7 +3496,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3513,7 +3513,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_online", value="on", @@ -3521,7 +3521,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_online", value="on", @@ -3530,7 +3530,7 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3540,7 +3540,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3554,7 +3554,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3571,7 +3571,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="always_use_https", value="on", @@ -3579,7 +3579,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="always_use_https", value="on", @@ -3588,7 +3588,7 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3598,7 +3598,7 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3612,7 +3612,7 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3629,7 +3629,7 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_https_rewrites", value="on", @@ -3637,7 +3637,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_https_rewrites", value="on", @@ -3646,7 +3646,7 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3656,7 +3656,7 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3670,7 +3670,7 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3687,7 +3687,7 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="brotli", value="on", @@ -3695,7 +3695,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="brotli", value="on", @@ -3704,7 +3704,7 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3714,7 +3714,7 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3728,7 +3728,7 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3745,7 +3745,7 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_cache_ttl", value=0, @@ -3753,7 +3753,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_cache_ttl", value=0, @@ -3762,7 +3762,7 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3772,7 +3772,7 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3786,7 +3786,7 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3803,7 +3803,7 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="browser_check", value="on", @@ -3811,7 +3811,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="browser_check", value="on", @@ -3820,7 +3820,7 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3830,7 +3830,7 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No @parametrize async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3844,7 +3844,7 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3861,7 +3861,7 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cache_level", value="aggressive", @@ -3869,7 +3869,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cache_level", value="aggressive", @@ -3878,7 +3878,7 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3888,7 +3888,7 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3902,7 +3902,7 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3919,7 +3919,7 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="challenge_ttl", value=300, @@ -3927,7 +3927,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="challenge_ttl", value=300, @@ -3936,7 +3936,7 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3946,7 +3946,7 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3960,7 +3960,7 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3977,7 +3977,7 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3985,7 +3985,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], @@ -3994,7 +3994,7 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4004,7 +4004,7 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4018,7 +4018,7 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_12(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4035,7 +4035,7 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="cname_flattening", value="flatten_at_root", @@ -4043,7 +4043,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="cname_flattening", value="flatten_at_root", @@ -4052,7 +4052,7 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4062,7 +4062,7 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4076,7 +4076,7 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_13(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4093,7 +4093,7 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="development_mode", value="on", @@ -4101,7 +4101,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="development_mode", value="on", @@ -4110,7 +4110,7 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4120,7 +4120,7 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4134,7 +4134,7 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_14(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4151,7 +4151,7 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="early_hints", value="on", @@ -4159,7 +4159,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="early_hints", value="on", @@ -4168,7 +4168,7 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4178,7 +4178,7 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4192,7 +4192,7 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_15(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4209,7 +4209,7 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="edge_cache_ttl", value=30, @@ -4217,7 +4217,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="edge_cache_ttl", value=30, @@ -4226,7 +4226,7 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4236,7 +4236,7 @@ async def test_method_edit_overload_16(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4250,7 +4250,7 @@ async def test_raw_response_edit_overload_16(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_16(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4267,7 +4267,7 @@ async def test_streaming_response_edit_overload_16(self, async_client: AsyncClou async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="email_obfuscation", value="on", @@ -4275,7 +4275,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="email_obfuscation", value="on", @@ -4284,7 +4284,7 @@ async def test_path_params_edit_overload_16(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4294,7 +4294,7 @@ async def test_method_edit_overload_17(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4308,7 +4308,7 @@ async def test_raw_response_edit_overload_17(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_17(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4325,7 +4325,7 @@ async def test_streaming_response_edit_overload_17(self, async_client: AsyncClou async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="h2_prioritization", value="on", @@ -4333,7 +4333,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="h2_prioritization", value="on", @@ -4342,7 +4342,7 @@ async def test_path_params_edit_overload_17(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4352,7 +4352,7 @@ async def test_method_edit_overload_18(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4366,7 +4366,7 @@ async def test_raw_response_edit_overload_18(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_18(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4383,7 +4383,7 @@ async def test_streaming_response_edit_overload_18(self, async_client: AsyncClou async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="hotlink_protection", value="on", @@ -4391,7 +4391,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="hotlink_protection", value="on", @@ -4400,7 +4400,7 @@ async def test_path_params_edit_overload_18(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4410,7 +4410,7 @@ async def test_method_edit_overload_19(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4424,7 +4424,7 @@ async def test_raw_response_edit_overload_19(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_19(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4441,7 +4441,7 @@ async def test_streaming_response_edit_overload_19(self, async_client: AsyncClou async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http2", value="on", @@ -4449,7 +4449,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http2", value="on", @@ -4458,7 +4458,7 @@ async def test_path_params_edit_overload_19(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4468,7 +4468,7 @@ async def test_method_edit_overload_20(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4482,7 +4482,7 @@ async def test_raw_response_edit_overload_20(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_20(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4499,7 +4499,7 @@ async def test_streaming_response_edit_overload_20(self, async_client: AsyncClou async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="http3", value="on", @@ -4507,7 +4507,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="http3", value="on", @@ -4516,7 +4516,7 @@ async def test_path_params_edit_overload_20(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4526,7 +4526,7 @@ async def test_method_edit_overload_21(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4540,7 +4540,7 @@ async def test_raw_response_edit_overload_21(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_21(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4557,7 +4557,7 @@ async def test_streaming_response_edit_overload_21(self, async_client: AsyncClou async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="image_resizing", value="on", @@ -4565,7 +4565,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="image_resizing", value="on", @@ -4574,7 +4574,7 @@ async def test_path_params_edit_overload_21(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_22(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4584,7 +4584,7 @@ async def test_method_edit_overload_22(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_22(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4598,7 +4598,7 @@ async def test_raw_response_edit_overload_22(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_22(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4615,7 +4615,7 @@ async def test_streaming_response_edit_overload_22(self, async_client: AsyncClou async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ip_geolocation", value="on", @@ -4623,7 +4623,7 @@ async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ip_geolocation", value="on", @@ -4632,7 +4632,7 @@ async def test_path_params_edit_overload_22(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_23(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4642,7 +4642,7 @@ async def test_method_edit_overload_23(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_23(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4656,7 +4656,7 @@ async def test_raw_response_edit_overload_23(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_23(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4673,7 +4673,7 @@ async def test_streaming_response_edit_overload_23(self, async_client: AsyncClou async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ipv6", value="on", @@ -4681,7 +4681,7 @@ async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ipv6", value="on", @@ -4690,7 +4690,7 @@ async def test_path_params_edit_overload_23(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_24(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4700,7 +4700,7 @@ async def test_method_edit_overload_24(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_24(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4714,7 +4714,7 @@ async def test_raw_response_edit_overload_24(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_24(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4731,7 +4731,7 @@ async def test_streaming_response_edit_overload_24(self, async_client: AsyncClou async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="max_upload", value=100, @@ -4739,7 +4739,7 @@ async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="max_upload", value=100, @@ -4748,7 +4748,7 @@ async def test_path_params_edit_overload_24(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_25(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4758,7 +4758,7 @@ async def test_method_edit_overload_25(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_25(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4772,7 +4772,7 @@ async def test_raw_response_edit_overload_25(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_25(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4789,7 +4789,7 @@ async def test_streaming_response_edit_overload_25(self, async_client: AsyncClou async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="min_tls_version", value="1.0", @@ -4797,7 +4797,7 @@ async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="min_tls_version", value="1.0", @@ -4806,7 +4806,7 @@ async def test_path_params_edit_overload_25(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_26(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4816,7 +4816,7 @@ async def test_method_edit_overload_26(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_26(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={ @@ -4830,7 +4830,7 @@ async def test_method_edit_with_all_params_overload_26(self, async_client: Async @parametrize async def test_raw_response_edit_overload_26(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4844,7 +4844,7 @@ async def test_raw_response_edit_overload_26(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_26(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4861,7 +4861,7 @@ async def test_streaming_response_edit_overload_26(self, async_client: AsyncClou async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="minify", value={}, @@ -4869,7 +4869,7 @@ async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="minify", value={}, @@ -4878,7 +4878,7 @@ async def test_path_params_edit_overload_26(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_27(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4888,7 +4888,7 @@ async def test_method_edit_overload_27(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_27(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4902,7 +4902,7 @@ async def test_raw_response_edit_overload_27(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_27(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4919,7 +4919,7 @@ async def test_streaming_response_edit_overload_27(self, async_client: AsyncClou async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mirage", value="on", @@ -4927,7 +4927,7 @@ async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mirage", value="on", @@ -4936,7 +4936,7 @@ async def test_path_params_edit_overload_27(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_28(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -4946,7 +4946,7 @@ async def test_method_edit_overload_28(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_28(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={ @@ -4960,7 +4960,7 @@ async def test_method_edit_with_all_params_overload_28(self, async_client: Async @parametrize async def test_raw_response_edit_overload_28(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -4974,7 +4974,7 @@ async def test_raw_response_edit_overload_28(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_28(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -4991,7 +4991,7 @@ async def test_streaming_response_edit_overload_28(self, async_client: AsyncClou async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="mobile_redirect", value={}, @@ -4999,7 +4999,7 @@ async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="mobile_redirect", value={}, @@ -5008,7 +5008,7 @@ async def test_path_params_edit_overload_28(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_29(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5018,7 +5018,7 @@ async def test_method_edit_overload_29(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_29(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={"enabled": False}, @@ -5028,7 +5028,7 @@ async def test_method_edit_with_all_params_overload_29(self, async_client: Async @parametrize async def test_raw_response_edit_overload_29(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5042,7 +5042,7 @@ async def test_raw_response_edit_overload_29(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_29(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5059,7 +5059,7 @@ async def test_streaming_response_edit_overload_29(self, async_client: AsyncClou async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="nel", value={}, @@ -5067,7 +5067,7 @@ async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="nel", value={}, @@ -5076,7 +5076,7 @@ async def test_path_params_edit_overload_29(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_30(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5086,7 +5086,7 @@ async def test_method_edit_overload_30(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_30(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5100,7 +5100,7 @@ async def test_raw_response_edit_overload_30(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_30(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5117,7 +5117,7 @@ async def test_streaming_response_edit_overload_30(self, async_client: AsyncClou async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_encryption", value="on", @@ -5125,7 +5125,7 @@ async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_encryption", value="on", @@ -5134,7 +5134,7 @@ async def test_path_params_edit_overload_30(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_31(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5144,7 +5144,7 @@ async def test_method_edit_overload_31(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_31(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5158,7 +5158,7 @@ async def test_raw_response_edit_overload_31(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_31(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5175,7 +5175,7 @@ async def test_streaming_response_edit_overload_31(self, async_client: AsyncClou async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="opportunistic_onion", value="on", @@ -5183,7 +5183,7 @@ async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="opportunistic_onion", value="on", @@ -5192,7 +5192,7 @@ async def test_path_params_edit_overload_31(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_32(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5202,7 +5202,7 @@ async def test_method_edit_overload_32(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_32(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5216,7 +5216,7 @@ async def test_raw_response_edit_overload_32(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_32(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5233,7 +5233,7 @@ async def test_streaming_response_edit_overload_32(self, async_client: AsyncClou async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="orange_to_orange", value="on", @@ -5241,7 +5241,7 @@ async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="orange_to_orange", value="on", @@ -5250,7 +5250,7 @@ async def test_path_params_edit_overload_32(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_33(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5260,7 +5260,7 @@ async def test_method_edit_overload_33(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_33(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5274,7 +5274,7 @@ async def test_raw_response_edit_overload_33(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_33(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5291,7 +5291,7 @@ async def test_streaming_response_edit_overload_33(self, async_client: AsyncClou async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="origin_error_page_pass_thru", value="on", @@ -5299,7 +5299,7 @@ async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="origin_error_page_pass_thru", value="on", @@ -5308,7 +5308,7 @@ async def test_path_params_edit_overload_33(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_34(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5318,7 +5318,7 @@ async def test_method_edit_overload_34(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_34(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5332,7 +5332,7 @@ async def test_raw_response_edit_overload_34(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_34(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5349,7 +5349,7 @@ async def test_streaming_response_edit_overload_34(self, async_client: AsyncClou async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="polish", value="off", @@ -5357,7 +5357,7 @@ async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="polish", value="off", @@ -5366,7 +5366,7 @@ async def test_path_params_edit_overload_34(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_35(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5376,7 +5376,7 @@ async def test_method_edit_overload_35(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_35(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5390,7 +5390,7 @@ async def test_raw_response_edit_overload_35(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_35(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5407,7 +5407,7 @@ async def test_streaming_response_edit_overload_35(self, async_client: AsyncClou async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="prefetch_preload", value="on", @@ -5415,7 +5415,7 @@ async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="prefetch_preload", value="on", @@ -5424,7 +5424,7 @@ async def test_path_params_edit_overload_35(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_36(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5434,7 +5434,7 @@ async def test_method_edit_overload_36(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_36(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5448,7 +5448,7 @@ async def test_raw_response_edit_overload_36(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_36(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5465,7 +5465,7 @@ async def test_streaming_response_edit_overload_36(self, async_client: AsyncClou async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="proxy_read_timeout", value=0, @@ -5473,7 +5473,7 @@ async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="proxy_read_timeout", value=0, @@ -5482,7 +5482,7 @@ async def test_path_params_edit_overload_36(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_37(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5492,7 +5492,7 @@ async def test_method_edit_overload_37(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_37(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5506,7 +5506,7 @@ async def test_raw_response_edit_overload_37(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_37(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5523,7 +5523,7 @@ async def test_streaming_response_edit_overload_37(self, async_client: AsyncClou async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="pseudo_ipv4", value="off", @@ -5531,7 +5531,7 @@ async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="pseudo_ipv4", value="off", @@ -5540,7 +5540,7 @@ async def test_path_params_edit_overload_37(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_38(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5550,7 +5550,7 @@ async def test_method_edit_overload_38(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_38(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5564,7 +5564,7 @@ async def test_raw_response_edit_overload_38(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_38(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5581,7 +5581,7 @@ async def test_streaming_response_edit_overload_38(self, async_client: AsyncClou async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="replace_insecure_js", value="on", @@ -5589,7 +5589,7 @@ async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="replace_insecure_js", value="on", @@ -5598,7 +5598,7 @@ async def test_path_params_edit_overload_38(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_39(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5608,7 +5608,7 @@ async def test_method_edit_overload_39(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_39(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5622,7 +5622,7 @@ async def test_raw_response_edit_overload_39(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_39(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5639,7 +5639,7 @@ async def test_streaming_response_edit_overload_39(self, async_client: AsyncClou async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="response_buffering", value="on", @@ -5647,7 +5647,7 @@ async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="response_buffering", value="on", @@ -5656,7 +5656,7 @@ async def test_path_params_edit_overload_39(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_40(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5666,7 +5666,7 @@ async def test_method_edit_overload_40(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_40(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5680,7 +5680,7 @@ async def test_raw_response_edit_overload_40(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_40(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5697,7 +5697,7 @@ async def test_streaming_response_edit_overload_40(self, async_client: AsyncClou async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="rocket_loader", value="on", @@ -5705,7 +5705,7 @@ async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="rocket_loader", value="on", @@ -5714,7 +5714,7 @@ async def test_path_params_edit_overload_40(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_41(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5731,7 +5731,7 @@ async def test_method_edit_overload_41(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_41(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5752,7 +5752,7 @@ async def test_raw_response_edit_overload_41(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_41(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5776,7 +5776,7 @@ async def test_streaming_response_edit_overload_41(self, async_client: AsyncClou async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="automatic_platform_optimization", value={ @@ -5791,7 +5791,7 @@ async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="automatic_platform_optimization", value={ @@ -5807,7 +5807,7 @@ async def test_path_params_edit_overload_41(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_42(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5817,7 +5817,7 @@ async def test_method_edit_overload_42(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_42(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={ @@ -5835,7 +5835,7 @@ async def test_method_edit_with_all_params_overload_42(self, async_client: Async @parametrize async def test_raw_response_edit_overload_42(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5849,7 +5849,7 @@ async def test_raw_response_edit_overload_42(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_42(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5866,7 +5866,7 @@ async def test_streaming_response_edit_overload_42(self, async_client: AsyncClou async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_header", value={}, @@ -5874,7 +5874,7 @@ async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_header", value={}, @@ -5883,7 +5883,7 @@ async def test_path_params_edit_overload_42(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_43(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5893,7 +5893,7 @@ async def test_method_edit_overload_43(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_43(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5907,7 +5907,7 @@ async def test_raw_response_edit_overload_43(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_43(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5924,7 +5924,7 @@ async def test_streaming_response_edit_overload_43(self, async_client: AsyncClou async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="security_level", value="off", @@ -5932,7 +5932,7 @@ async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="security_level", value="off", @@ -5941,7 +5941,7 @@ async def test_path_params_edit_overload_43(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_44(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5951,7 +5951,7 @@ async def test_method_edit_overload_44(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_44(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5965,7 +5965,7 @@ async def test_raw_response_edit_overload_44(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_44(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5982,7 +5982,7 @@ async def test_streaming_response_edit_overload_44(self, async_client: AsyncClou async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="server_side_exclude", value="on", @@ -5990,7 +5990,7 @@ async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="server_side_exclude", value="on", @@ -5999,7 +5999,7 @@ async def test_path_params_edit_overload_44(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_45(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6009,7 +6009,7 @@ async def test_method_edit_overload_45(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_45(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6023,7 +6023,7 @@ async def test_raw_response_edit_overload_45(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_45(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6040,7 +6040,7 @@ async def test_streaming_response_edit_overload_45(self, async_client: AsyncClou async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sha1_support", value="on", @@ -6048,7 +6048,7 @@ async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sha1_support", value="on", @@ -6057,7 +6057,7 @@ async def test_path_params_edit_overload_45(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_46(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6067,7 +6067,7 @@ async def test_method_edit_overload_46(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_46(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6081,7 +6081,7 @@ async def test_raw_response_edit_overload_46(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_46(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6098,7 +6098,7 @@ async def test_streaming_response_edit_overload_46(self, async_client: AsyncClou async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="sort_query_string_for_cache", value="on", @@ -6106,7 +6106,7 @@ async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="sort_query_string_for_cache", value="on", @@ -6115,7 +6115,7 @@ async def test_path_params_edit_overload_46(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_47(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6125,7 +6125,7 @@ async def test_method_edit_overload_47(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_47(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6139,7 +6139,7 @@ async def test_raw_response_edit_overload_47(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_47(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6156,7 +6156,7 @@ async def test_streaming_response_edit_overload_47(self, async_client: AsyncClou async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="ssl", value="off", @@ -6164,7 +6164,7 @@ async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl", value="off", @@ -6173,7 +6173,7 @@ async def test_path_params_edit_overload_47(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_48(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) @@ -6181,7 +6181,7 @@ async def test_method_edit_overload_48(self, async_client: AsyncCloudflare) -> N @parametrize async def test_method_edit_with_all_params_overload_48(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="ssl_recommender", enabled=True, @@ -6191,7 +6191,7 @@ async def test_method_edit_with_all_params_overload_48(self, async_client: Async @parametrize async def test_raw_response_edit_overload_48(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -6203,7 +6203,7 @@ async def test_raw_response_edit_overload_48(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_48(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -6218,20 +6218,20 @@ async def test_streaming_response_edit_overload_48(self, async_client: AsyncClou async def test_path_params_edit_overload_48(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @parametrize async def test_method_edit_overload_49(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6241,7 +6241,7 @@ async def test_method_edit_overload_49(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_49(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6255,7 +6255,7 @@ async def test_raw_response_edit_overload_49(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_49(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6272,7 +6272,7 @@ async def test_streaming_response_edit_overload_49(self, async_client: AsyncClou async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_2_only", value="on", @@ -6280,7 +6280,7 @@ async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_2_only", value="on", @@ -6289,7 +6289,7 @@ async def test_path_params_edit_overload_49(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_50(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6299,7 +6299,7 @@ async def test_method_edit_overload_50(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_50(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6313,7 +6313,7 @@ async def test_raw_response_edit_overload_50(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_50(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6330,7 +6330,7 @@ async def test_streaming_response_edit_overload_50(self, async_client: AsyncClou async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_1_3", value="on", @@ -6338,7 +6338,7 @@ async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_1_3", value="on", @@ -6347,7 +6347,7 @@ async def test_path_params_edit_overload_50(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_51(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6357,7 +6357,7 @@ async def test_method_edit_overload_51(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_51(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6371,7 +6371,7 @@ async def test_raw_response_edit_overload_51(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_51(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6388,7 +6388,7 @@ async def test_streaming_response_edit_overload_51(self, async_client: AsyncClou async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="tls_client_auth", value="on", @@ -6396,7 +6396,7 @@ async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="tls_client_auth", value="on", @@ -6405,7 +6405,7 @@ async def test_path_params_edit_overload_51(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_52(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6415,7 +6415,7 @@ async def test_method_edit_overload_52(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_52(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6429,7 +6429,7 @@ async def test_raw_response_edit_overload_52(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_52(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6446,7 +6446,7 @@ async def test_streaming_response_edit_overload_52(self, async_client: AsyncClou async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="true_client_ip_header", value="on", @@ -6454,7 +6454,7 @@ async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="true_client_ip_header", value="on", @@ -6463,7 +6463,7 @@ async def test_path_params_edit_overload_52(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_53(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6473,7 +6473,7 @@ async def test_method_edit_overload_53(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_53(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6487,7 +6487,7 @@ async def test_raw_response_edit_overload_53(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_53(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6504,7 +6504,7 @@ async def test_streaming_response_edit_overload_53(self, async_client: AsyncClou async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="waf", value="on", @@ -6512,7 +6512,7 @@ async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="waf", value="on", @@ -6521,7 +6521,7 @@ async def test_path_params_edit_overload_53(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_54(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6531,7 +6531,7 @@ async def test_method_edit_overload_54(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_54(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6545,7 +6545,7 @@ async def test_raw_response_edit_overload_54(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_54(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6562,7 +6562,7 @@ async def test_streaming_response_edit_overload_54(self, async_client: AsyncClou async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="webp", value="on", @@ -6570,7 +6570,7 @@ async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="webp", value="on", @@ -6579,7 +6579,7 @@ async def test_path_params_edit_overload_54(self, async_client: AsyncCloudflare) @parametrize async def test_method_edit_overload_55(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6589,7 +6589,7 @@ async def test_method_edit_overload_55(self, async_client: AsyncCloudflare) -> N @parametrize async def test_raw_response_edit_overload_55(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6603,7 +6603,7 @@ async def test_raw_response_edit_overload_55(self, async_client: AsyncCloudflare @parametrize async def test_streaming_response_edit_overload_55(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.edit( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6620,7 +6620,7 @@ async def test_streaming_response_edit_overload_55(self, async_client: AsyncClou async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "always_online", + setting_id="always_online", zone_id="", id="websockets", value="on", @@ -6628,7 +6628,7 @@ async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.edit( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", id="websockets", value="on", @@ -6637,7 +6637,7 @@ async def test_path_params_edit_overload_55(self, async_client: AsyncCloudflare) @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zones.settings.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -6645,7 +6645,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -6657,7 +6657,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.settings.with_streaming_response.get( - "always_online", + setting_id="always_online", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) as response: assert not response.is_closed @@ -6672,12 +6672,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.zones.settings.with_raw_response.get( - "always_online", + setting_id="always_online", zone_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `setting_id` but received ''"): await async_client.zones.settings.with_raw_response.get( - "", + setting_id="", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py index 2c194b3fb30..6a6f83dc72e 100644 --- a/tests/api_resources/zones/test_subscriptions.py +++ b/tests/api_resources/zones/test_subscriptions.py @@ -22,15 +22,15 @@ class TestSubscriptions: @parametrize def test_method_create(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -68,7 +68,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.zones.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -79,7 +79,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.zones.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): client.zones.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize @@ -179,15 +179,15 @@ class TestAsyncSubscriptions: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert_matches_type(SubscriptionCreateResponse, subscription, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.create( - "506e3185e9c882d175a2d0cb0093d9f2", - app={"install_id": "string"}, + identifier="506e3185e9c882d175a2d0cb0093d9f2", + app={"install_id": "install_id"}, component_values=[ { "default": 5, @@ -225,7 +225,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.zones.subscriptions.with_raw_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) assert response.is_closed is True @@ -236,7 +236,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.zones.subscriptions.with_streaming_response.create( - "506e3185e9c882d175a2d0cb0093d9f2", + identifier="506e3185e9c882d175a2d0cb0093d9f2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,7 +250,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): await async_client.zones.subscriptions.with_raw_response.create( - "", + identifier="", ) @parametrize