From 14b7e5f00f4ac1f2260a2c34b51007dd1841afd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 04:48:10 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#365) --- src/cloudflare/resources/accounts/members.py | 40 +- src/cloudflare/resources/accounts/roles.py | 16 +- .../types/accounts/member_create_params.py | 2 +- .../types/accounts/member_list_params.py | 2 +- .../types/accounts/member_update_params.py | 2 +- tests/api_resources/accounts/test_members.py | 170 +++++-- tests/api_resources/accounts/test_roles.py | 58 ++- .../firewall/test_access_rules.py | 60 --- .../logpush/datasets/test_fields.py | 14 - .../logpush/datasets/test_jobs.py | 14 - tests/api_resources/logpush/test_jobs.py | 60 --- tests/api_resources/logpush/test_ownership.py | 24 - tests/api_resources/logpush/test_validate.py | 24 - .../rulesets/phases/test_versions.py | 26 - tests/api_resources/rulesets/test_phases.py | 24 - tests/api_resources/rulesets/test_rules.py | 466 ------------------ tests/api_resources/rulesets/test_versions.py | 46 -- tests/api_resources/test_rulesets.py | 66 --- .../access/applications/test_cas.py | 54 -- .../access/applications/test_policies.py | 76 --- .../applications/test_user_policy_checks.py | 12 - .../access/certificates/test_settings.py | 24 - .../zero_trust/access/test_applications.py | 240 --------- .../zero_trust/access/test_certificates.py | 66 --- .../zero_trust/access/test_groups.py | 66 --- .../zero_trust/access/test_service_tokens.py | 52 -- .../zero_trust/test_identity_providers.py | 404 --------------- .../zero_trust/test_organizations.py | 48 -- tests/utils.py | 17 +- 29 files changed, 237 insertions(+), 1936 deletions(-) diff --git a/src/cloudflare/resources/accounts/members.py b/src/cloudflare/resources/accounts/members.py index 0a9618d6a48..602ab0f69d7 100644 --- a/src/cloudflare/resources/accounts/members.py +++ b/src/cloudflare/resources/accounts/members.py @@ -47,7 +47,7 @@ def with_streaming_response(self) -> MembersResourceWithStreamingResponse: def create( self, *, - account_id: object, + account_id: str, email: str, roles: List[str], status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN, @@ -74,6 +74,8 @@ def create( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( f"/accounts/{account_id}/members", body=maybe_transform( @@ -98,7 +100,7 @@ def update( self, member_id: str, *, - account_id: object, + account_id: str, roles: Iterable[member_update_params.Role], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -123,6 +125,8 @@ def update( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return self._put( @@ -141,7 +145,7 @@ def update( def list( self, *, - account_id: object, + account_id: str, direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, order: Literal["user.first_name", "user.last_name", "user.email", "status"] | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, @@ -176,6 +180,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/members", page=SyncV4PagePaginationArray[MemberListResponse], @@ -202,7 +208,7 @@ def delete( self, member_id: str, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -224,6 +230,8 @@ def delete( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return self._delete( @@ -242,7 +250,7 @@ def get( self, member_id: str, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -264,6 +272,8 @@ def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return self._get( @@ -291,7 +301,7 @@ def with_streaming_response(self) -> AsyncMembersResourceWithStreamingResponse: async def create( self, *, - account_id: object, + account_id: str, email: str, roles: List[str], status: Literal["accepted", "pending"] | NotGiven = NOT_GIVEN, @@ -318,6 +328,8 @@ async def create( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( f"/accounts/{account_id}/members", body=await async_maybe_transform( @@ -342,7 +354,7 @@ async def update( self, member_id: str, *, - account_id: object, + account_id: str, roles: Iterable[member_update_params.Role], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -367,6 +379,8 @@ async def update( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return await self._put( @@ -385,7 +399,7 @@ async def update( def list( self, *, - account_id: object, + account_id: str, direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN, order: Literal["user.first_name", "user.last_name", "user.email", "status"] | NotGiven = NOT_GIVEN, page: float | NotGiven = NOT_GIVEN, @@ -420,6 +434,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/members", page=AsyncV4PagePaginationArray[MemberListResponse], @@ -446,7 +462,7 @@ async def delete( self, member_id: str, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -468,6 +484,8 @@ async def delete( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return await self._delete( @@ -486,7 +504,7 @@ async def get( self, member_id: str, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -508,6 +526,8 @@ async def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not member_id: raise ValueError(f"Expected a non-empty value for `member_id` but received {member_id!r}") return await self._get( diff --git a/src/cloudflare/resources/accounts/roles.py b/src/cloudflare/resources/accounts/roles.py index 35a5ac1b607..f316a2caa9a 100644 --- a/src/cloudflare/resources/accounts/roles.py +++ b/src/cloudflare/resources/accounts/roles.py @@ -39,7 +39,7 @@ def with_streaming_response(self) -> RolesResourceWithStreamingResponse: def list( self, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -59,6 +59,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/roles", page=SyncSinglePage[Role], @@ -72,7 +74,7 @@ def get( self, role_id: object, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -92,6 +94,8 @@ def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return cast( RoleGetResponse, self._get( @@ -122,7 +126,7 @@ def with_streaming_response(self) -> AsyncRolesResourceWithStreamingResponse: def list( self, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -142,6 +146,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/roles", page=AsyncSinglePage[Role], @@ -155,7 +161,7 @@ async def get( self, role_id: object, *, - account_id: object, + account_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -175,6 +181,8 @@ async def get( timeout: Override the client-level default timeout for this request, in seconds """ + if not account_id: + raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return cast( RoleGetResponse, await self._get( diff --git a/src/cloudflare/types/accounts/member_create_params.py b/src/cloudflare/types/accounts/member_create_params.py index 55c96a1d861..69acda8f5da 100644 --- a/src/cloudflare/types/accounts/member_create_params.py +++ b/src/cloudflare/types/accounts/member_create_params.py @@ -9,7 +9,7 @@ class MemberCreateParams(TypedDict, total=False): - account_id: Required[object] + account_id: Required[str] email: Required[str] """The contact email address of the user.""" diff --git a/src/cloudflare/types/accounts/member_list_params.py b/src/cloudflare/types/accounts/member_list_params.py index a42060948a7..1b594104750 100644 --- a/src/cloudflare/types/accounts/member_list_params.py +++ b/src/cloudflare/types/accounts/member_list_params.py @@ -8,7 +8,7 @@ class MemberListParams(TypedDict, total=False): - account_id: Required[object] + account_id: Required[str] direction: Literal["asc", "desc"] """Direction to order results.""" diff --git a/src/cloudflare/types/accounts/member_update_params.py b/src/cloudflare/types/accounts/member_update_params.py index 69867eb443e..48139d2a39b 100644 --- a/src/cloudflare/types/accounts/member_update_params.py +++ b/src/cloudflare/types/accounts/member_update_params.py @@ -9,7 +9,7 @@ class MemberUpdateParams(TypedDict, total=False): - account_id: Required[object] + account_id: Required[str] roles: Required[Iterable[Role]] """Roles assigned to this member.""" diff --git a/tests/api_resources/accounts/test_members.py b/tests/api_resources/accounts/test_members.py index 539445948a0..97ba2d55e34 100644 --- a/tests/api_resources/accounts/test_members.py +++ b/tests/api_resources/accounts/test_members.py @@ -25,7 +25,7 @@ class TestMembers: @parametrize def test_method_create(self, client: Cloudflare) -> None: member = client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -39,7 +39,7 @@ def test_method_create(self, client: Cloudflare) -> None: @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: member = client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -54,7 +54,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -72,7 +72,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -88,12 +88,26 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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.accounts.members.with_raw_response.create( + account_id="", + email="user@example.com", + roles=[ + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + ], + ) + @pytest.mark.skip() @parametrize def test_method_update(self, client: Cloudflare) -> None: member = client.accounts.members.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -107,7 +121,7 @@ def test_method_update(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -125,7 +139,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -143,10 +157,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: @pytest.mark.skip() @parametrize 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.accounts.members.with_raw_response.update( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + roles=[ + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + ], + ) + with pytest.raises(ValueError, match=r"Expected a non-empty value for `member_id` but received ''"): client.accounts.members.with_raw_response.update( "", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -158,7 +183,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: member = client.accounts.members.list( - account_id={}, + account_id="string", ) assert_matches_type(SyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) @@ -166,7 +191,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: member = client.accounts.members.list( - account_id={}, + account_id="string", direction="desc", order="status", page=1, @@ -179,7 +204,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -191,7 +216,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -201,12 +226,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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.accounts.members.with_raw_response.list( + account_id="", + ) + @pytest.mark.skip() @parametrize def test_method_delete(self, client: Cloudflare) -> None: member = client.accounts.members.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) @@ -215,7 +248,7 @@ def test_method_delete(self, client: Cloudflare) -> None: def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -228,7 +261,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,10 +274,16 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: @pytest.mark.skip() @parametrize 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", + 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( "", - account_id={}, + account_id="string", ) @pytest.mark.skip() @@ -252,7 +291,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: member = client.accounts.members.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert_matches_type(Member, member, path=["response"]) @@ -261,7 +300,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.members.with_raw_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -274,7 +313,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.members.with_streaming_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -287,10 +326,16 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: @pytest.mark.skip() @parametrize 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", + 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( "", - account_id={}, + account_id="string", ) @@ -301,7 +346,7 @@ class TestAsyncMembers: @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -315,7 +360,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: member = await async_client.accounts.members.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -330,7 +375,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.accounts.members.with_raw_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -348,7 +393,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.accounts.members.with_streaming_response.create( - account_id={}, + account_id="string", email="user@example.com", roles=[ "3536bcfad5faccb999b47003c79917fb", @@ -364,12 +409,26 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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.accounts.members.with_raw_response.create( + account_id="", + email="user@example.com", + roles=[ + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + "3536bcfad5faccb999b47003c79917fb", + ], + ) + @pytest.mark.skip() @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -383,7 +442,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.accounts.members.with_raw_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -401,7 +460,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.update( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -419,10 +478,21 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> @pytest.mark.skip() @parametrize 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.accounts.members.with_raw_response.update( + "4536bcfad5faccb111b47003c79917fa", + account_id="", + roles=[ + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + {"id": "3536bcfad5faccb999b47003c79917fb"}, + ], + ) + 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( "", - account_id={}, + account_id="string", roles=[ {"id": "3536bcfad5faccb999b47003c79917fb"}, {"id": "3536bcfad5faccb999b47003c79917fb"}, @@ -434,7 +504,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.list( - account_id={}, + account_id="string", ) assert_matches_type(AsyncV4PagePaginationArray[MemberListResponse], member, path=["response"]) @@ -442,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: member = await async_client.accounts.members.list( - account_id={}, + account_id="string", direction="desc", order="status", page=1, @@ -455,7 +525,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.accounts.members.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -467,7 +537,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.accounts.members.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -477,12 +547,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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.accounts.members.with_raw_response.list( + account_id="", + ) + @pytest.mark.skip() @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert_matches_type(Optional[MemberDeleteResponse], member, path=["response"]) @@ -491,7 +569,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.accounts.members.with_raw_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -504,7 +582,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.accounts.members.with_streaming_response.delete( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -517,10 +595,16 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> @pytest.mark.skip() @parametrize 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", + 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( "", - account_id={}, + account_id="string", ) @pytest.mark.skip() @@ -528,7 +612,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: member = await async_client.accounts.members.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert_matches_type(Member, member, path=["response"]) @@ -537,7 +621,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.accounts.members.with_raw_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -550,7 +634,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.accounts.members.with_streaming_response.get( "4536bcfad5faccb111b47003c79917fa", - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -563,8 +647,14 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No @pytest.mark.skip() @parametrize 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", + 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( "", - account_id={}, + account_id="string", ) diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 0012acf6de2..bf1a66c3e57 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -23,7 +23,7 @@ class TestRoles: @parametrize def test_method_list(self, client: Cloudflare) -> None: role = client.accounts.roles.list( - account_id={}, + account_id="string", ) assert_matches_type(SyncSinglePage[Role], role, path=["response"]) @@ -31,7 +31,7 @@ def test_method_list(self, client: Cloudflare) -> None: @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.accounts.roles.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -43,7 +43,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.accounts.roles.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -53,12 +53,20 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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.accounts.roles.with_raw_response.list( + account_id="", + ) + @pytest.mark.skip() @parametrize def test_method_get(self, client: Cloudflare) -> None: role = client.accounts.roles.get( {}, - account_id={}, + account_id="string", ) assert_matches_type(RoleGetResponse, role, path=["response"]) @@ -67,7 +75,7 @@ def test_method_get(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.accounts.roles.with_raw_response.get( {}, - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -80,7 +88,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.accounts.roles.with_streaming_response.get( {}, - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -90,6 +98,15 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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( + {}, + account_id="", + ) + class TestAsyncRoles: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -98,7 +115,7 @@ class TestAsyncRoles: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.list( - account_id={}, + account_id="string", ) assert_matches_type(AsyncSinglePage[Role], role, path=["response"]) @@ -106,7 +123,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.accounts.roles.with_raw_response.list( - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -118,7 +135,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.accounts.roles.with_streaming_response.list( - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,12 +145,20 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip() + @parametrize + 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.accounts.roles.with_raw_response.list( + account_id="", + ) + @pytest.mark.skip() @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.get( {}, - account_id={}, + account_id="string", ) assert_matches_type(RoleGetResponse, role, path=["response"]) @@ -142,7 +167,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.accounts.roles.with_raw_response.get( {}, - account_id={}, + account_id="string", ) assert response.is_closed is True @@ -155,7 +180,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.accounts.roles.with_streaming_response.get( {}, - account_id={}, + account_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -164,3 +189,12 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert_matches_type(RoleGetResponse, role, path=["response"]) assert cast(Any, response.is_closed) is True + + @pytest.mark.skip() + @parametrize + 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( + {}, + account_id="", + ) diff --git a/tests/api_resources/firewall/test_access_rules.py b/tests/api_resources/firewall/test_access_rules.py index 236125f1470..551da028952 100644 --- a/tests/api_resources/firewall/test_access_rules.py +++ b/tests/api_resources/firewall/test_access_rules.py @@ -28,7 +28,6 @@ def test_method_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -42,7 +41,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -54,7 +52,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -69,7 +66,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,7 +83,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -95,7 +90,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -103,7 +97,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncV4PagePaginationArray[object], access_rule, path=["response"]) @@ -112,7 +105,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.list( account_id="string", - zone_id="string", direction="desc", egs_pagination={ "json": { @@ -138,7 +130,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -151,7 +142,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -167,13 +157,11 @@ 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.firewall.access_rules.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -182,7 +170,6 @@ def test_method_delete(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( {}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -192,7 +179,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.delete( {}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -202,7 +188,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.delete( {}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -216,7 +201,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.delete( {}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,14 +217,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.firewall.access_rules.with_raw_response.delete( {}, account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -251,7 +233,6 @@ def test_method_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -266,7 +247,6 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -279,7 +259,6 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -295,7 +274,6 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -314,7 +292,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -323,7 +300,6 @@ def test_path_params_edit(self, client: Cloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -332,7 +308,6 @@ def test_method_get(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -342,7 +317,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: access_rule = client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -352,7 +326,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.firewall.access_rules.with_raw_response.get( {}, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -366,7 +339,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.firewall.access_rules.with_streaming_response.get( {}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -383,14 +355,12 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.firewall.access_rules.with_raw_response.get( {}, account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -404,7 +374,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -418,7 +387,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleCreateResponse, access_rule, path=["response"]) @@ -430,7 +398,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -445,7 +412,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -463,7 +429,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -471,7 +436,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -479,7 +443,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncV4PagePaginationArray[object], access_rule, path=["response"]) @@ -488,7 +451,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", direction="desc", egs_pagination={ "json": { @@ -514,7 +476,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -527,7 +488,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -543,13 +503,11 @@ 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.firewall.access_rules.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -558,7 +516,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.delete( {}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -568,7 +525,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare access_rule = await async_client.firewall.access_rules.delete( {}, account_id="string", - zone_id="string", ) assert_matches_type(Optional[AccessRuleDeleteResponse], access_rule, path=["response"]) @@ -578,7 +534,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -592,7 +547,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.firewall.access_rules.with_streaming_response.delete( {}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -609,14 +563,12 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.firewall.access_rules.with_raw_response.delete( {}, account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -627,7 +579,6 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -642,7 +593,6 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) }, mode="challenge", account_id="string", - zone_id="string", notes="This rule is enabled because of an event that occurred on date X.", ) assert_matches_type(AccessRuleEditResponse, access_rule, path=["response"]) @@ -655,7 +605,6 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -671,7 +620,6 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N configuration={}, mode="challenge", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -690,7 +638,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -699,7 +646,6 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -708,7 +654,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -718,7 +663,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - access_rule = await async_client.firewall.access_rules.get( {}, account_id="string", - zone_id="string", ) assert_matches_type(AccessRuleGetResponse, access_rule, path=["response"]) @@ -728,7 +672,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -742,7 +685,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.firewall.access_rules.with_streaming_response.get( {}, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -759,12 +701,10 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.firewall.access_rules.with_raw_response.get( {}, account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/logpush/datasets/test_fields.py b/tests/api_resources/logpush/datasets/test_fields.py index cd6ac1cc813..e676171ea8f 100644 --- a/tests/api_resources/logpush/datasets/test_fields.py +++ b/tests/api_resources/logpush/datasets/test_fields.py @@ -22,7 +22,6 @@ def test_method_get(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) @@ -32,7 +31,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: field = client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) @@ -42,7 +40,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.fields.with_raw_response.get( "http_requests", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -56,7 +53,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.fields.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,21 +69,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.logpush.datasets.fields.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -100,7 +93,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: field = await async_client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) @@ -110,7 +102,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - field = await async_client.logpush.datasets.fields.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(object, field, path=["response"]) @@ -120,7 +111,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -134,7 +124,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.logpush.datasets.fields.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -151,19 +140,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.datasets.fields.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/logpush/datasets/test_jobs.py b/tests/api_resources/logpush/datasets/test_jobs.py index e65ea0b6394..1de6c7b6f15 100644 --- a/tests/api_resources/logpush/datasets/test_jobs.py +++ b/tests/api_resources/logpush/datasets/test_jobs.py @@ -23,7 +23,6 @@ def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -33,7 +32,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -43,7 +41,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.datasets.jobs.with_raw_response.get( "http_requests", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -57,7 +54,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.datasets.jobs.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -74,21 +70,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.logpush.datasets.jobs.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -101,7 +94,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -111,7 +103,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - job = await async_client.logpush.datasets.jobs.get( "http_requests", account_id="string", - zone_id="string", ) assert_matches_type(Optional[JobGetResponse], job, path=["response"]) @@ -121,7 +112,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -135,7 +125,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.logpush.datasets.jobs.with_streaming_response.get( "http_requests", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -152,19 +141,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.datasets.jobs.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index 61e462a0054..a4f3b116eba 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -24,7 +24,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -34,7 +33,6 @@ 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", - zone_id="string", dataset="http_requests", enabled=False, frequency="high", @@ -64,7 +62,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -78,7 +75,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -95,14 +91,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -111,7 +105,6 @@ def test_method_update(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -121,7 +114,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.update( 1, account_id="string", - zone_id="string", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", @@ -150,7 +142,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.update( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -164,7 +155,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.update( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -181,14 +171,12 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.logpush.jobs.with_raw_response.update( 1, account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -196,7 +184,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -205,7 +192,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -214,7 +200,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -227,7 +212,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -243,13 +227,11 @@ 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.logpush.jobs.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -258,7 +240,6 @@ def test_method_delete(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( 1, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) @@ -268,7 +249,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.delete( 1, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) @@ -278,7 +258,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.delete( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -292,7 +271,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.delete( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -309,14 +287,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.logpush.jobs.with_raw_response.delete( 1, account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -325,7 +301,6 @@ def test_method_get(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -335,7 +310,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: job = client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -345,7 +319,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.logpush.jobs.with_raw_response.get( 1, account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -359,7 +332,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.logpush.jobs.with_streaming_response.get( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -376,14 +348,12 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.logpush.jobs.with_raw_response.get( 1, account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -396,7 +366,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -406,7 +375,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare job = await async_client.logpush.jobs.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", dataset="http_requests", enabled=False, frequency="high", @@ -436,7 +404,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -450,7 +417,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.logpush.jobs.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -467,14 +433,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.jobs.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -483,7 +447,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.update( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -493,7 +456,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare job = await async_client.logpush.jobs.update( 1, account_id="string", - zone_id="string", destination_conf="s3://mybucket/logs?region=us-west-2", enabled=False, frequency="high", @@ -522,7 +484,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -536,7 +497,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async with async_client.logpush.jobs.with_streaming_response.update( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -553,14 +513,12 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.jobs.with_raw_response.update( 1, account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -568,7 +526,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -577,7 +534,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @@ -586,7 +542,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.logpush.jobs.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -599,7 +554,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.logpush.jobs.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -615,13 +569,11 @@ 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.logpush.jobs.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -630,7 +582,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.delete( 1, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) @@ -640,7 +591,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare job = await async_client.logpush.jobs.delete( 1, account_id="string", - zone_id="string", ) assert_matches_type(object, job, path=["response"]) @@ -650,7 +600,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -664,7 +613,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.logpush.jobs.with_streaming_response.delete( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -681,14 +629,12 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.jobs.with_raw_response.delete( 1, account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -697,7 +643,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: job = await async_client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -707,7 +652,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - job = await async_client.logpush.jobs.get( 1, account_id="string", - zone_id="string", ) assert_matches_type(Optional[LogpushJob], job, path=["response"]) @@ -717,7 +661,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -731,7 +674,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.logpush.jobs.with_streaming_response.get( 1, account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -748,12 +690,10 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.jobs.with_raw_response.get( 1, account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/logpush/test_ownership.py b/tests/api_resources/logpush/test_ownership.py index 21ff01d1960..98eadb69629 100644 --- a/tests/api_resources/logpush/test_ownership.py +++ b/tests/api_resources/logpush/test_ownership.py @@ -24,7 +24,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -34,7 +33,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -44,7 +42,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -58,7 +55,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -75,14 +71,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -92,7 +86,6 @@ def test_method_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -103,7 +96,6 @@ def test_method_validate_with_all_params(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -114,7 +106,6 @@ def test_raw_response_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -129,7 +120,6 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,7 +137,6 @@ def test_path_params_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -155,7 +144,6 @@ def test_path_params_validate(self, client: Cloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="", ) @@ -168,7 +156,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -178,7 +165,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ownership = await async_client.logpush.ownership.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipCreateResponse], ownership, path=["response"]) @@ -188,7 +174,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -202,7 +187,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.logpush.ownership.with_streaming_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -219,14 +203,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.ownership.with_raw_response.create( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -236,7 +218,6 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None: destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -247,7 +228,6 @@ async def test_method_validate_with_all_params(self, async_client: AsyncCloudfla destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OwnershipValidation], ownership, path=["response"]) @@ -258,7 +238,6 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -273,7 +252,6 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare) destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -291,7 +269,6 @@ async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -299,5 +276,4 @@ async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None destination_conf="s3://mybucket/logs?region=us-west-2", ownership_challenge="00000000000000000000", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/logpush/test_validate.py b/tests/api_resources/logpush/test_validate.py index 51aad1568b6..e701c09a4ba 100644 --- a/tests/api_resources/logpush/test_validate.py +++ b/tests/api_resources/logpush/test_validate.py @@ -24,7 +24,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -34,7 +33,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -44,7 +42,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -58,7 +55,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -75,14 +71,12 @@ def test_path_params_destination(self, client: Cloudflare) -> None: client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -91,7 +85,6 @@ def test_method_origin(self, client: Cloudflare) -> None: validate = client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -101,7 +94,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -111,7 +103,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -125,7 +116,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -142,14 +132,12 @@ def test_path_params_origin(self, client: Cloudflare) -> None: client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -162,7 +150,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -172,7 +159,6 @@ async def test_method_destination_with_all_params(self, async_client: AsyncCloud validate = await async_client.logpush.validate.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateDestinationResponse], validate, path=["response"]) @@ -182,7 +168,6 @@ async def test_raw_response_destination(self, async_client: AsyncCloudflare) -> response = await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -196,7 +181,6 @@ async def test_streaming_response_destination(self, async_client: AsyncCloudflar async with async_client.logpush.validate.with_streaming_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -213,14 +197,12 @@ async def test_path_params_destination(self, async_client: AsyncCloudflare) -> N await async_client.logpush.validate.with_raw_response.destination( destination_conf="s3://mybucket/logs?region=us-west-2", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -229,7 +211,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -239,7 +220,6 @@ async def test_method_origin_with_all_params(self, async_client: AsyncCloudflare validate = await async_client.logpush.validate.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ValidateOriginResponse], validate, path=["response"]) @@ -249,7 +229,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -263,7 +242,6 @@ async def test_streaming_response_origin(self, async_client: AsyncCloudflare) -> async with async_client.logpush.validate.with_streaming_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,12 +258,10 @@ async def test_path_params_origin(self, async_client: AsyncCloudflare) -> None: await async_client.logpush.validate.with_raw_response.origin( logpull_options="fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index e8db8adaf1e..39532fca0a3 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -25,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) @@ -35,7 +34,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) @@ -45,7 +43,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -59,7 +56,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -76,14 +72,12 @@ def test_path_params_list(self, client: Cloudflare) -> None: client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -93,7 +87,6 @@ def test_method_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -104,7 +97,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -115,7 +107,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -130,7 +121,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,7 +138,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -156,7 +145,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -164,7 +152,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="", ) @@ -177,7 +164,6 @@ 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) @@ -187,7 +173,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) version = await async_client.rulesets.phases.versions.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) @@ -197,7 +182,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -211,7 +195,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async with async_client.rulesets.phases.versions.with_streaming_response.list( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -228,14 +211,12 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.rulesets.phases.versions.with_raw_response.list( "http_request_firewall_custom", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -245,7 +226,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -256,7 +236,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -267,7 +246,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -282,7 +260,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -300,7 +277,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -308,7 +284,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -316,5 +291,4 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_phase="http_request_firewall_custom", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 043b1b5e3b4..cbaa34f62b2 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -25,7 +25,6 @@ def test_method_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) @@ -85,7 +84,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -100,7 +98,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -115,7 +112,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -133,7 +129,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -141,7 +136,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -150,7 +144,6 @@ def test_method_get(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -160,7 +153,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: phase = client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -170,7 +162,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -184,7 +175,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.phases.with_streaming_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -201,14 +191,12 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -222,7 +210,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(PhaseUpdateResponse, phase, path=["response"]) @@ -282,7 +269,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -297,7 +283,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -312,7 +297,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -330,7 +314,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -338,7 +321,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -347,7 +329,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: phase = await async_client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -357,7 +338,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - phase = await async_client.rulesets.phases.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) assert_matches_type(PhaseGetResponse, phase, path=["response"]) @@ -367,7 +347,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -381,7 +360,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.rulesets.phases.with_streaming_response.get( "http_request_firewall_custom", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -398,12 +376,10 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.rulesets.phases.with_raw_response.get( "http_request_firewall_custom", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index f8d39340c0b..59d4d888a5c 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -25,7 +25,6 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -35,7 +34,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -59,7 +57,6 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -73,7 +70,6 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -90,21 +86,18 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -113,7 +106,6 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -123,7 +115,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -141,7 +132,6 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -155,7 +145,6 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -172,21 +161,18 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -195,7 +181,6 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -205,7 +190,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -223,7 +207,6 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -237,7 +220,6 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,21 +236,18 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -277,7 +256,6 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -287,7 +265,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -330,7 +307,6 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -344,7 +320,6 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -361,21 +336,18 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -384,7 +356,6 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -394,7 +365,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -412,7 +382,6 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -426,7 +395,6 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -443,21 +411,18 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -466,7 +431,6 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -476,7 +440,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -494,7 +457,6 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -508,7 +470,6 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -525,21 +486,18 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -548,7 +506,6 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -558,7 +515,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -576,7 +532,6 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -590,7 +545,6 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -607,21 +561,18 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -630,7 +581,6 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -640,7 +590,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -668,7 +617,6 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -682,7 +630,6 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -699,21 +646,18 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -722,7 +666,6 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -732,7 +675,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -761,7 +703,6 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -775,7 +716,6 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -792,21 +732,18 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -815,7 +752,6 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -825,7 +761,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -850,7 +785,6 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -864,7 +798,6 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -881,21 +814,18 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -904,7 +834,6 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -914,7 +843,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -932,7 +860,6 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -946,7 +873,6 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -963,21 +889,18 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -986,7 +909,6 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -996,7 +918,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -1018,7 +939,6 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1032,7 +952,6 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1049,21 +968,18 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1072,7 +988,6 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1082,7 +997,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -1120,7 +1034,6 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1134,7 +1047,6 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1151,21 +1063,18 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1174,7 +1083,6 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1184,7 +1092,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -1208,7 +1115,6 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1222,7 +1128,6 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1239,21 +1144,18 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1262,7 +1164,6 @@ def test_method_create_overload_15(self, client: Cloudflare) -> None: rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -1272,7 +1173,6 @@ def test_method_create_with_all_params_overload_15(self, client: Cloudflare) -> rule = client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -1368,7 +1268,6 @@ def test_raw_response_create_overload_15(self, client: Cloudflare) -> None: response = client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1382,7 +1281,6 @@ def test_streaming_response_create_overload_15(self, client: Cloudflare) -> None with client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1399,21 +1297,18 @@ def test_path_params_create_overload_15(self, client: Cloudflare) -> None: client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1423,7 +1318,6 @@ def test_method_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -1434,7 +1328,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -1445,7 +1338,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1460,7 +1352,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1478,7 +1369,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1486,7 +1376,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1494,7 +1383,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1502,7 +1390,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1512,7 +1399,6 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1523,7 +1409,6 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -1548,7 +1433,6 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1563,7 +1447,6 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1581,7 +1464,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1589,7 +1471,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1597,7 +1478,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1605,7 +1485,6 @@ def test_path_params_edit_overload_1(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1615,7 +1494,6 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1626,7 +1504,6 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -1645,7 +1522,6 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1660,7 +1536,6 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1678,7 +1553,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1686,7 +1560,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1694,7 +1567,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1702,7 +1574,6 @@ def test_path_params_edit_overload_2(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1712,7 +1583,6 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1723,7 +1593,6 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -1742,7 +1611,6 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1757,7 +1625,6 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1775,7 +1642,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1783,7 +1649,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1791,7 +1656,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1799,7 +1663,6 @@ def test_path_params_edit_overload_3(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1809,7 +1672,6 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1820,7 +1682,6 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -1864,7 +1725,6 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1879,7 +1739,6 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1897,7 +1756,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -1905,7 +1763,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1913,7 +1770,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1921,7 +1777,6 @@ def test_path_params_edit_overload_4(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1931,7 +1786,6 @@ def test_method_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -1942,7 +1796,6 @@ def test_method_edit_with_all_params_overload_5(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -1961,7 +1814,6 @@ def test_raw_response_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1976,7 +1828,6 @@ def test_streaming_response_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1994,7 +1845,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2002,7 +1852,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2010,7 +1859,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2018,7 +1866,6 @@ def test_path_params_edit_overload_5(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2028,7 +1875,6 @@ def test_method_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2039,7 +1885,6 @@ def test_method_edit_with_all_params_overload_6(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -2058,7 +1903,6 @@ def test_raw_response_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2073,7 +1917,6 @@ def test_streaming_response_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2091,7 +1934,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2099,7 +1941,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2107,7 +1948,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2115,7 +1955,6 @@ def test_path_params_edit_overload_6(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2125,7 +1964,6 @@ def test_method_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2136,7 +1974,6 @@ def test_method_edit_with_all_params_overload_7(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -2155,7 +1992,6 @@ def test_raw_response_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2170,7 +2006,6 @@ def test_streaming_response_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2188,7 +2023,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2196,7 +2030,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2204,7 +2037,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2212,7 +2044,6 @@ def test_path_params_edit_overload_7(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2222,7 +2053,6 @@ def test_method_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2233,7 +2063,6 @@ def test_method_edit_with_all_params_overload_8(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -2262,7 +2091,6 @@ def test_raw_response_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2277,7 +2105,6 @@ def test_streaming_response_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2295,7 +2122,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2303,7 +2129,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2311,7 +2136,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2319,7 +2143,6 @@ def test_path_params_edit_overload_8(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2329,7 +2152,6 @@ def test_method_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2340,7 +2162,6 @@ def test_method_edit_with_all_params_overload_9(self, client: Cloudflare) -> Non "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -2370,7 +2191,6 @@ def test_raw_response_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2385,7 +2205,6 @@ def test_streaming_response_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2403,7 +2222,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2411,7 +2229,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2419,7 +2236,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2427,7 +2243,6 @@ def test_path_params_edit_overload_9(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2437,7 +2252,6 @@ def test_method_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2448,7 +2262,6 @@ def test_method_edit_with_all_params_overload_10(self, client: Cloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -2474,7 +2287,6 @@ def test_raw_response_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2489,7 +2301,6 @@ def test_streaming_response_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2507,7 +2318,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2515,7 +2325,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2523,7 +2332,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2531,7 +2339,6 @@ def test_path_params_edit_overload_10(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2541,7 +2348,6 @@ def test_method_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2552,7 +2358,6 @@ def test_method_edit_with_all_params_overload_11(self, client: Cloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -2571,7 +2376,6 @@ def test_raw_response_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2586,7 +2390,6 @@ def test_streaming_response_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2604,7 +2407,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2612,7 +2414,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2620,7 +2421,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2628,7 +2428,6 @@ def test_path_params_edit_overload_11(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2638,7 +2437,6 @@ def test_method_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2649,7 +2447,6 @@ def test_method_edit_with_all_params_overload_12(self, client: Cloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -2672,7 +2469,6 @@ def test_raw_response_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2687,7 +2483,6 @@ def test_streaming_response_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2705,7 +2500,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2713,7 +2507,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2721,7 +2514,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2729,7 +2521,6 @@ def test_path_params_edit_overload_12(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2739,7 +2530,6 @@ def test_method_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2750,7 +2540,6 @@ def test_method_edit_with_all_params_overload_13(self, client: Cloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -2789,7 +2578,6 @@ def test_raw_response_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2804,7 +2592,6 @@ def test_streaming_response_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2822,7 +2609,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2830,7 +2616,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2838,7 +2623,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2846,7 +2630,6 @@ def test_path_params_edit_overload_13(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2856,7 +2639,6 @@ def test_method_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2867,7 +2649,6 @@ def test_method_edit_with_all_params_overload_14(self, client: Cloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -2892,7 +2673,6 @@ def test_raw_response_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2907,7 +2687,6 @@ def test_streaming_response_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2925,7 +2704,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -2933,7 +2711,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2941,7 +2718,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2949,7 +2725,6 @@ def test_path_params_edit_overload_14(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2959,7 +2734,6 @@ def test_method_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -2970,7 +2744,6 @@ def test_method_edit_with_all_params_overload_15(self, client: Cloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -3067,7 +2840,6 @@ def test_raw_response_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3082,7 +2854,6 @@ def test_streaming_response_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3100,7 +2871,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -3108,7 +2878,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -3116,7 +2885,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3124,7 +2892,6 @@ def test_path_params_edit_overload_15(self, client: Cloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @@ -3137,7 +2904,6 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3147,7 +2913,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -3171,7 +2936,6 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3185,7 +2949,6 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3202,21 +2965,18 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3225,7 +2985,6 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3235,7 +2994,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -3253,7 +3011,6 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3267,7 +3024,6 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3284,21 +3040,18 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3307,7 +3060,6 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3317,7 +3069,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -3335,7 +3086,6 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3349,7 +3099,6 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3366,21 +3115,18 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3389,7 +3135,6 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3399,7 +3144,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -3442,7 +3186,6 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3456,7 +3199,6 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3473,21 +3215,18 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3496,7 +3235,6 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3506,7 +3244,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -3524,7 +3261,6 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3538,7 +3274,6 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3555,21 +3290,18 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3578,7 +3310,6 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3588,7 +3319,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -3606,7 +3336,6 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3620,7 +3349,6 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3637,21 +3365,18 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3660,7 +3385,6 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3670,7 +3394,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -3688,7 +3411,6 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3702,7 +3424,6 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3719,21 +3440,18 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3742,7 +3460,6 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3752,7 +3469,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -3780,7 +3496,6 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3794,7 +3509,6 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3811,21 +3525,18 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3834,7 +3545,6 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3844,7 +3554,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -3873,7 +3582,6 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3887,7 +3595,6 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3904,21 +3611,18 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3927,7 +3631,6 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -3937,7 +3640,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -3962,7 +3664,6 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3976,7 +3677,6 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3993,21 +3693,18 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -4016,7 +3713,6 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4026,7 +3722,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -4044,7 +3739,6 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4058,7 +3752,6 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4075,21 +3768,18 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -4098,7 +3788,6 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4108,7 +3797,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -4130,7 +3818,6 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4144,7 +3831,6 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4161,21 +3847,18 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -4184,7 +3867,6 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4194,7 +3876,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -4232,7 +3913,6 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4246,7 +3926,6 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4263,21 +3942,18 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -4286,7 +3962,6 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4296,7 +3971,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -4320,7 +3994,6 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4334,7 +4007,6 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4351,21 +4023,18 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -4374,7 +4043,6 @@ async def test_method_create_overload_15(self, async_client: AsyncCloudflare) -> rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleCreateResponse, rule, path=["response"]) @@ -4384,7 +4052,6 @@ async def test_method_create_with_all_params_overload_15(self, async_client: Asy rule = await async_client.rulesets.rules.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -4480,7 +4147,6 @@ async def test_raw_response_create_overload_15(self, async_client: AsyncCloudfla response = await async_client.rulesets.rules.with_raw_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4494,7 +4160,6 @@ async def test_streaming_response_create_overload_15(self, async_client: AsyncCl async with async_client.rulesets.rules.with_streaming_response.create( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4511,21 +4176,18 @@ async def test_path_params_create_overload_15(self, async_client: AsyncCloudflar await async_client.rulesets.rules.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -4535,7 +4197,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -4546,7 +4207,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleDeleteResponse, rule, path=["response"]) @@ -4557,7 +4217,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4572,7 +4231,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4590,7 +4248,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4598,7 +4255,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4606,7 +4262,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4614,7 +4269,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4624,7 +4278,6 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -4635,7 +4288,6 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="block", action_parameters={ @@ -4660,7 +4312,6 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4675,7 +4326,6 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4693,7 +4343,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4701,7 +4350,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4709,7 +4357,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4717,7 +4364,6 @@ async def test_path_params_edit_overload_1(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4727,7 +4373,6 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -4738,7 +4383,6 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="challenge", action_parameters={}, @@ -4757,7 +4401,6 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4772,7 +4415,6 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4790,7 +4432,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4798,7 +4439,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4806,7 +4446,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4814,7 +4453,6 @@ async def test_path_params_edit_overload_2(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4824,7 +4462,6 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -4835,7 +4472,6 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="compress_response", action_parameters={"algorithms": [{"name": "none"}]}, @@ -4854,7 +4490,6 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4869,7 +4504,6 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4887,7 +4521,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -4895,7 +4528,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4903,7 +4535,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4911,7 +4542,6 @@ async def test_path_params_edit_overload_3(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4921,7 +4551,6 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -4932,7 +4561,6 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="execute", action_parameters={ @@ -4976,7 +4604,6 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4991,7 +4618,6 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5009,7 +4635,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5017,7 +4642,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5025,7 +4649,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5033,7 +4656,6 @@ async def test_path_params_edit_overload_4(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5043,7 +4665,6 @@ async def test_method_edit_overload_5(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5054,7 +4675,6 @@ async def test_method_edit_with_all_params_overload_5(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="js_challenge", action_parameters={}, @@ -5073,7 +4693,6 @@ async def test_raw_response_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5088,7 +4707,6 @@ async def test_streaming_response_edit_overload_5(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5106,7 +4724,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5114,7 +4731,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5122,7 +4738,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5130,7 +4745,6 @@ async def test_path_params_edit_overload_5(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5140,7 +4754,6 @@ async def test_method_edit_overload_6(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5151,7 +4764,6 @@ async def test_method_edit_with_all_params_overload_6(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="log", action_parameters={}, @@ -5170,7 +4782,6 @@ async def test_raw_response_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5185,7 +4796,6 @@ async def test_streaming_response_edit_overload_6(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5203,7 +4813,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5211,7 +4820,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5219,7 +4827,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5227,7 +4834,6 @@ async def test_path_params_edit_overload_6(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5237,7 +4843,6 @@ async def test_method_edit_overload_7(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5248,7 +4853,6 @@ async def test_method_edit_with_all_params_overload_7(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="managed_challenge", action_parameters={}, @@ -5267,7 +4871,6 @@ async def test_raw_response_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5282,7 +4885,6 @@ async def test_streaming_response_edit_overload_7(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5300,7 +4902,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5308,7 +4909,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5316,7 +4916,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5324,7 +4923,6 @@ async def test_path_params_edit_overload_7(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5334,7 +4932,6 @@ async def test_method_edit_overload_8(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5345,7 +4942,6 @@ async def test_method_edit_with_all_params_overload_8(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="redirect", action_parameters={ @@ -5374,7 +4970,6 @@ async def test_raw_response_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5389,7 +4984,6 @@ async def test_streaming_response_edit_overload_8(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5407,7 +5001,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5415,7 +5008,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5423,7 +5015,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5431,7 +5022,6 @@ async def test_path_params_edit_overload_8(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5441,7 +5031,6 @@ async def test_method_edit_overload_9(self, async_client: AsyncCloudflare) -> No "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5452,7 +5041,6 @@ async def test_method_edit_with_all_params_overload_9(self, async_client: AsyncC "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="rewrite", action_parameters={ @@ -5482,7 +5070,6 @@ async def test_raw_response_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5497,7 +5084,6 @@ async def test_streaming_response_edit_overload_9(self, async_client: AsyncCloud "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5515,7 +5101,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5523,7 +5108,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5531,7 +5115,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5539,7 +5122,6 @@ async def test_path_params_edit_overload_9(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5549,7 +5131,6 @@ async def test_method_edit_overload_10(self, async_client: AsyncCloudflare) -> N "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5560,7 +5141,6 @@ async def test_method_edit_with_all_params_overload_10(self, async_client: Async "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="route", action_parameters={ @@ -5586,7 +5166,6 @@ async def test_raw_response_edit_overload_10(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5601,7 +5180,6 @@ async def test_streaming_response_edit_overload_10(self, async_client: AsyncClou "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5619,7 +5197,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5627,7 +5204,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5635,7 +5211,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5643,7 +5218,6 @@ async def test_path_params_edit_overload_10(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5653,7 +5227,6 @@ async def test_method_edit_overload_11(self, async_client: AsyncCloudflare) -> N "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5664,7 +5237,6 @@ async def test_method_edit_with_all_params_overload_11(self, async_client: Async "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="score", action_parameters={"increment": 3}, @@ -5683,7 +5255,6 @@ async def test_raw_response_edit_overload_11(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5698,7 +5269,6 @@ async def test_streaming_response_edit_overload_11(self, async_client: AsyncClou "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5716,7 +5286,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5724,7 +5293,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5732,7 +5300,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5740,7 +5307,6 @@ async def test_path_params_edit_overload_11(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5750,7 +5316,6 @@ async def test_method_edit_overload_12(self, async_client: AsyncCloudflare) -> N "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5761,7 +5326,6 @@ async def test_method_edit_with_all_params_overload_12(self, async_client: Async "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="serve_error", action_parameters={ @@ -5784,7 +5348,6 @@ async def test_raw_response_edit_overload_12(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5799,7 +5362,6 @@ async def test_streaming_response_edit_overload_12(self, async_client: AsyncClou "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5817,7 +5379,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5825,7 +5386,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5833,7 +5393,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5841,7 +5400,6 @@ async def test_path_params_edit_overload_12(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5851,7 +5409,6 @@ async def test_method_edit_overload_13(self, async_client: AsyncCloudflare) -> N "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5862,7 +5419,6 @@ async def test_method_edit_with_all_params_overload_13(self, async_client: Async "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_config", action_parameters={ @@ -5901,7 +5457,6 @@ async def test_raw_response_edit_overload_13(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5916,7 +5471,6 @@ async def test_streaming_response_edit_overload_13(self, async_client: AsyncClou "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5934,7 +5488,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -5942,7 +5495,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5950,7 +5502,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5958,7 +5509,6 @@ async def test_path_params_edit_overload_13(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5968,7 +5518,6 @@ async def test_method_edit_overload_14(self, async_client: AsyncCloudflare) -> N "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -5979,7 +5528,6 @@ async def test_method_edit_with_all_params_overload_14(self, async_client: Async "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="skip", action_parameters={ @@ -6004,7 +5552,6 @@ async def test_raw_response_edit_overload_14(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -6019,7 +5566,6 @@ async def test_streaming_response_edit_overload_14(self, async_client: AsyncClou "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6037,7 +5583,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -6045,7 +5590,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -6053,7 +5597,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6061,7 +5604,6 @@ async def test_path_params_edit_overload_14(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -6071,7 +5613,6 @@ async def test_method_edit_overload_15(self, async_client: AsyncCloudflare) -> N "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RuleEditResponse, rule, path=["response"]) @@ -6082,7 +5623,6 @@ async def test_method_edit_with_all_params_overload_15(self, async_client: Async "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", id="3a03d665bac047339bb530ecb439a90d", action="set_cache_settings", action_parameters={ @@ -6179,7 +5719,6 @@ async def test_raw_response_edit_overload_15(self, async_client: AsyncCloudflare "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -6194,7 +5733,6 @@ async def test_streaming_response_edit_overload_15(self, async_client: AsyncClou "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6212,7 +5750,6 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_id` but received ''"): @@ -6220,7 +5757,6 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -6228,7 +5764,6 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -6236,5 +5771,4 @@ async def test_path_params_edit_overload_15(self, async_client: AsyncCloudflare) "3a03d665bac047339bb530ecb439a90d", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 10a620f81c8..061605b9dfb 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -25,7 +25,6 @@ def test_method_list(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) @@ -35,7 +34,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: version = client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], version, path=["response"]) @@ -45,7 +43,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -59,7 +56,6 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.versions.with_streaming_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -76,21 +72,18 @@ def test_path_params_list(self, client: Cloudflare) -> None: client.rulesets.versions.with_raw_response.list( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.versions.with_raw_response.list( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -100,7 +93,6 @@ def test_method_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None @@ -111,7 +103,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None @@ -122,7 +113,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -137,7 +127,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,7 +144,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -163,7 +151,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -171,7 +158,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -179,7 +165,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -189,7 +174,6 @@ def test_method_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -200,7 +184,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -211,7 +194,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -226,7 +208,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -244,7 +225,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -252,7 +232,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -260,7 +239,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -268,7 +246,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @@ -281,7 +258,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: version = await async_client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) @@ -291,7 +267,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) version = await async_client.rulesets.versions.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], version, path=["response"]) @@ -301,7 +276,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -315,7 +289,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async with async_client.rulesets.versions.with_streaming_response.list( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -332,21 +305,18 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.rulesets.versions.with_raw_response.list( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -356,7 +326,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None @@ -367,7 +336,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert version is None @@ -378,7 +346,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -393,7 +360,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -411,7 +377,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -419,7 +384,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -427,7 +391,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -435,7 +398,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -445,7 +407,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -456,7 +417,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(VersionGetResponse, version, path=["response"]) @@ -467,7 +427,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -482,7 +441,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -500,7 +458,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"): @@ -508,7 +465,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -516,7 +472,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -524,5 +479,4 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "1", ruleset_id="2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="", ) diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index b949d47af75..73741fd0fe8 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -30,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -92,7 +91,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -106,7 +104,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -123,7 +120,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,7 +139,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -153,7 +148,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -163,7 +157,6 @@ def test_method_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) @@ -223,7 +216,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -238,7 +230,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -253,7 +244,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -271,7 +261,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -279,7 +268,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -287,7 +275,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -295,7 +282,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], ruleset, path=["response"]) @@ -304,7 +290,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Ruleset], ruleset, path=["response"]) @@ -313,7 +298,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -326,7 +310,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -342,13 +325,11 @@ 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.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -357,7 +338,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None @@ -367,7 +347,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None @@ -377,7 +356,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -391,7 +369,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -408,21 +385,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.rulesets.with_raw_response.delete( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -431,7 +405,6 @@ def test_method_get(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -441,7 +414,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ruleset = client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -451,7 +423,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -465,7 +436,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.rulesets.with_streaming_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -482,21 +452,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.rulesets.with_raw_response.get( "", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -512,7 +479,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -574,7 +540,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", ) assert_matches_type(RulesetCreateResponse, ruleset, path=["response"]) @@ -588,7 +553,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -605,7 +569,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -625,7 +588,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -635,7 +597,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: phase="http_request_firewall_custom", rules=[{}, {}, {}], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -645,7 +606,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert_matches_type(RulesetUpdateResponse, ruleset, path=["response"]) @@ -705,7 +665,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", description="My ruleset to execute managed rulesets", kind="root", name="My ruleset", @@ -720,7 +679,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -735,7 +693,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -753,7 +710,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "", rules=[{}, {}, {}], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -761,7 +717,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -769,7 +724,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "2f2feab2026849078ba485f918791bdc", rules=[{}, {}, {}], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -777,7 +731,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], ruleset, path=["response"]) @@ -786,7 +739,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Ruleset], ruleset, path=["response"]) @@ -795,7 +747,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -808,7 +759,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.rulesets.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -824,13 +774,11 @@ 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.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -839,7 +787,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None @@ -849,7 +796,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare ruleset = await async_client.rulesets.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert ruleset is None @@ -859,7 +805,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -873,7 +818,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.rulesets.with_streaming_response.delete( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -890,21 +834,18 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.rulesets.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -913,7 +854,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ruleset = await async_client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -923,7 +863,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ruleset = await async_client.rulesets.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert_matches_type(RulesetGetResponse, ruleset, path=["response"]) @@ -933,7 +872,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.rulesets.with_raw_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -947,7 +885,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.rulesets.with_streaming_response.get( "2f2feab2026849078ba485f918791bdc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -964,19 +901,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.rulesets.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) 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 810d4b337a2..a7c1b6c5792 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -27,7 +27,6 @@ def test_method_create(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -37,7 +36,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -47,7 +45,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -61,7 +58,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,21 +74,18 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.access.applications.cas.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -100,7 +93,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) @@ -109,7 +101,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[CA], ca, path=["response"]) @@ -118,7 +109,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.cas.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -131,7 +121,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.cas.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,13 +136,11 @@ 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.cas.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -162,7 +149,6 @@ def test_method_delete(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -172,7 +158,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -182,7 +167,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -196,7 +180,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -213,21 +196,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.zero_trust.access.applications.cas.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -236,7 +216,6 @@ def test_method_get(self, client: Cloudflare) -> None: ca = client.zero_trust.access.applications.cas.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -246,7 +225,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -256,7 +234,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -270,7 +247,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -287,21 +263,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.access.applications.cas.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -314,7 +287,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -324,7 +296,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ca = await async_client.zero_trust.access.applications.cas.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CACreateResponse], ca, path=["response"]) @@ -334,7 +305,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -348,7 +318,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.applications.cas.with_streaming_response.create( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,21 +334,18 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.cas.with_raw_response.create( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -387,7 +353,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: ca = await async_client.zero_trust.access.applications.cas.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) @@ -396,7 +361,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[CA], ca, path=["response"]) @@ -405,7 +369,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -418,7 +381,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -434,13 +396,11 @@ 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.cas.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -449,7 +409,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -459,7 +418,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare ca = await async_client.zero_trust.access.applications.cas.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CADeleteResponse], ca, path=["response"]) @@ -469,7 +427,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -483,7 +440,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.applications.cas.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -500,21 +456,18 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.cas.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -523,7 +476,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -533,7 +485,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ca = await async_client.zero_trust.access.applications.cas.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CAGetResponse], ca, path=["response"]) @@ -543,7 +494,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -557,7 +507,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.access.applications.cas.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -574,19 +523,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.cas.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_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 29c70fa87cf..f976a32b1d1 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -32,7 +32,6 @@ def test_method_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -49,7 +48,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -94,7 +92,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -115,7 +112,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +135,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -153,7 +148,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -167,7 +161,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -184,7 +177,6 @@ def test_method_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -202,7 +194,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -248,7 +239,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -270,7 +260,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -295,7 +284,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -310,7 +298,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -325,7 +312,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -340,7 +326,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -349,7 +334,6 @@ def test_method_list(self, client: Cloudflare) -> None: policy = client.zero_trust.access.applications.policies.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) @@ -359,7 +343,6 @@ 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", - zone_id="string", ) assert_matches_type(SyncSinglePage[Policy], policy, path=["response"]) @@ -369,7 +352,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -383,7 +365,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -400,21 +381,18 @@ def test_path_params_list(self, client: Cloudflare) -> None: client.zero_trust.access.applications.policies.with_raw_response.list( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -424,7 +402,6 @@ def test_method_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -435,7 +412,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -446,7 +422,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -461,7 +436,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -479,7 +453,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -487,7 +460,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -495,7 +467,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -503,7 +474,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -513,7 +483,6 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -524,7 +493,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -535,7 +503,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -550,7 +517,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -568,7 +534,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -576,7 +541,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -584,7 +548,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -592,7 +555,6 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) @@ -612,7 +574,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -629,7 +590,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -674,7 +634,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -695,7 +654,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -719,7 +677,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -733,7 +690,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -747,7 +703,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -764,7 +719,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -782,7 +736,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", approval_groups=[ { "approvals_needed": 1, @@ -828,7 +781,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -850,7 +802,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -875,7 +826,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -890,7 +840,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -905,7 +854,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -920,7 +868,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -929,7 +876,6 @@ 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) @@ -939,7 +885,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) policy = await async_client.zero_trust.access.applications.policies.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Policy], policy, path=["response"]) @@ -949,7 +894,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -963,7 +907,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async with async_client.zero_trust.access.applications.policies.with_streaming_response.list( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -980,21 +923,18 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.policies.with_raw_response.list( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1004,7 +944,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -1015,7 +954,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[PolicyDeleteResponse], policy, path=["response"]) @@ -1026,7 +964,6 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1041,7 +978,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1059,7 +995,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1067,7 +1002,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1075,7 +1009,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1083,7 +1016,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1093,7 +1025,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -1104,7 +1035,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Policy], policy, path=["response"]) @@ -1115,7 +1045,6 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1130,7 +1059,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1148,7 +1076,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `uuid` but received ''"): @@ -1156,7 +1083,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1164,7 +1090,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1172,5 +1097,4 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", uuid1="f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_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 5cd0fdf9dde..71416868f33 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 @@ -23,7 +23,6 @@ def test_method_list(self, client: Cloudflare) -> None: user_policy_check = client.zero_trust.access.applications.user_policy_checks.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -33,7 +32,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -43,7 +41,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -57,7 +54,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -74,14 +70,12 @@ def test_path_params_list(self, client: Cloudflare) -> None: client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -94,7 +88,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -104,7 +97,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) user_policy_check = await async_client.zero_trust.access.applications.user_policy_checks.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[UserPolicyCheckListResponse], user_policy_check, path=["response"]) @@ -114,7 +106,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -128,7 +119,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N async with async_client.zero_trust.access.applications.user_policy_checks.with_streaming_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,12 +135,10 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.user_policy_checks.with_raw_response.list( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_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 755db1f1b4f..7a68f3fe921 100644 --- a/tests/api_resources/zero_trust/access/certificates/test_settings.py +++ b/tests/api_resources/zero_trust/access/certificates/test_settings.py @@ -40,7 +40,6 @@ def test_method_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -66,7 +65,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -92,7 +90,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -122,7 +119,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,7 +151,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: }, ], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -178,7 +173,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: }, ], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -186,7 +180,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_get(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -195,7 +188,6 @@ def test_method_get(self, client: Cloudflare) -> None: def test_method_get_with_all_params(self, client: Cloudflare) -> None: setting = client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -204,7 +196,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.settings.with_raw_response.get( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -217,7 +208,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.settings.with_streaming_response.get( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,13 +223,11 @@ 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.certificates.settings.with_raw_response.get( account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -268,7 +256,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -294,7 +281,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ], account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingUpdateResponse], setting, path=["response"]) @@ -320,7 +306,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -350,7 +335,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> }, ], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -383,7 +367,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -406,7 +389,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: }, ], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -414,7 +396,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.access.certificates.settings.get( account_id="string", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -423,7 +404,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) @@ -432,7 +412,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - 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", - zone_id="string", ) assert response.is_closed is True @@ -445,7 +424,6 @@ 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.zero_trust.access.certificates.settings.with_streaming_response.get( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -461,11 +439,9 @@ 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.certificates.settings.with_raw_response.get( account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 9d22888966a..39d37e6caa4 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -26,7 +26,6 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -37,7 +36,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -86,7 +84,6 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -101,7 +98,6 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -119,7 +115,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -127,7 +122,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -135,7 +129,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: def test_method_create_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -144,7 +137,6 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -194,7 +186,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -207,7 +198,6 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -223,13 +213,11 @@ def test_path_params_create_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.create( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -239,7 +227,6 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -250,7 +237,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -299,7 +285,6 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -314,7 +299,6 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -332,7 +316,6 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -340,7 +323,6 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -350,7 +332,6 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -361,7 +342,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -410,7 +390,6 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -425,7 +404,6 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -443,7 +421,6 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -451,7 +428,6 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -460,7 +436,6 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -470,7 +445,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -487,7 +461,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -501,7 +474,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -518,14 +490,12 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -534,7 +504,6 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -544,7 +513,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -561,7 +529,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -575,7 +542,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -592,14 +558,12 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -608,7 +572,6 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -618,7 +581,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -635,7 +597,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -649,7 +610,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -666,14 +626,12 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -681,7 +639,6 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: def test_method_create_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -690,7 +647,6 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.create( account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -705,7 +661,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.create( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -718,7 +673,6 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.create( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -734,13 +688,11 @@ def test_path_params_create_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.create( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -751,7 +703,6 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -763,7 +714,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -813,7 +763,6 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -829,7 +778,6 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -848,7 +796,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -857,7 +804,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -866,7 +812,6 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -876,7 +821,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -927,7 +871,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -941,7 +884,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -958,14 +900,12 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -976,7 +916,6 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -988,7 +927,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1038,7 +976,6 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1054,7 +991,6 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1073,7 +1009,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1082,7 +1017,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1093,7 +1027,6 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1105,7 +1038,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1155,7 +1087,6 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1171,7 +1102,6 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1190,7 +1120,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1199,7 +1128,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1209,7 +1137,6 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1220,7 +1147,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1238,7 +1164,6 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1253,7 +1178,6 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1271,7 +1195,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1279,7 +1202,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1289,7 +1211,6 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1300,7 +1221,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1318,7 +1238,6 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1333,7 +1252,6 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1351,7 +1269,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1359,7 +1276,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1369,7 +1285,6 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1380,7 +1295,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1398,7 +1312,6 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1413,7 +1326,6 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1431,7 +1343,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1439,7 +1350,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1448,7 +1358,6 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1458,7 +1367,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -1474,7 +1382,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -1488,7 +1395,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1505,14 +1411,12 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1520,7 +1424,6 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Application], application, path=["response"]) @@ -1529,7 +1432,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Application], application, path=["response"]) @@ -1538,7 +1440,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1551,7 +1452,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1567,13 +1467,11 @@ 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.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1582,7 +1480,6 @@ def test_method_delete(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -1592,7 +1489,6 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -1602,7 +1498,6 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1616,7 +1511,6 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1633,14 +1527,12 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1649,7 +1541,6 @@ def test_method_get(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1659,7 +1550,6 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1669,7 +1559,6 @@ def test_raw_response_get(self, client: Cloudflare) -> None: response = client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1683,7 +1572,6 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: with client.zero_trust.access.applications.with_streaming_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1700,14 +1588,12 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -1716,7 +1602,6 @@ def test_method_revoke_tokens(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) @@ -1726,7 +1611,6 @@ def test_method_revoke_tokens_with_all_params(self, client: Cloudflare) -> None: application = client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) @@ -1736,7 +1620,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -1750,7 +1633,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1767,14 +1649,12 @@ def test_path_params_revoke_tokens(self, client: Cloudflare) -> None: client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -1788,7 +1668,6 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1799,7 +1678,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -1848,7 +1726,6 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1863,7 +1740,6 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1881,7 +1757,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1889,7 +1764,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1897,7 +1771,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -1906,7 +1779,6 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> 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", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -1956,7 +1828,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn 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", - zone_id="string", ) assert response.is_closed is True @@ -1969,7 +1840,6 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1985,13 +1855,11 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare 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.create( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2001,7 +1869,6 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2012,7 +1879,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2061,7 +1927,6 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2076,7 +1941,6 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2094,7 +1958,6 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2102,7 +1965,6 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2112,7 +1974,6 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2123,7 +1984,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2172,7 +2032,6 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2187,7 +2046,6 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2205,7 +2063,6 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2213,7 +2070,6 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2222,7 +2078,6 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2232,7 +2087,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2249,7 +2103,6 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2263,7 +2116,6 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2280,14 +2132,12 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( type="app_launcher", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2296,7 +2146,6 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2306,7 +2155,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2323,7 +2171,6 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2337,7 +2184,6 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2354,14 +2200,12 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( type="warp", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2370,7 +2214,6 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2380,7 +2223,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2397,7 +2239,6 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2411,7 +2252,6 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.create( type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2428,14 +2268,12 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.create( type="biso", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2443,7 +2281,6 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.create( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2452,7 +2289,6 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> 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", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -2467,7 +2303,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn 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", - zone_id="string", ) assert response.is_closed is True @@ -2480,7 +2315,6 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2496,13 +2330,11 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare 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.create( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2513,7 +2345,6 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2525,7 +2356,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2575,7 +2405,6 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2591,7 +2420,6 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2610,7 +2438,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2619,7 +2446,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="self_hosted", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2628,7 +2454,6 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2638,7 +2463,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -2689,7 +2513,6 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2703,7 +2526,6 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2720,14 +2542,12 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2738,7 +2558,6 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2750,7 +2569,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2800,7 +2618,6 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2816,7 +2633,6 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2835,7 +2651,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2844,7 +2659,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="ssh", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2855,7 +2669,6 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2867,7 +2680,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, allowed_idps=[ "699d98642c564d2e855e9661899b7252", @@ -2917,7 +2729,6 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2933,7 +2744,6 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2952,7 +2762,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2961,7 +2770,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare domain="test.example.com/admin", type="vnc", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2971,7 +2779,6 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -2982,7 +2789,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3000,7 +2806,6 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3015,7 +2820,6 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3033,7 +2837,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3041,7 +2844,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="app_launcher", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3051,7 +2853,6 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -3062,7 +2863,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3080,7 +2880,6 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3095,7 +2894,6 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3113,7 +2911,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3121,7 +2918,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="warp", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3131,7 +2927,6 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -3142,7 +2937,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", allowed_idps=[ "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", @@ -3160,7 +2954,6 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3175,7 +2968,6 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3193,7 +2985,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3201,7 +2992,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare "023e105f4ecef8ad9ca31a8372d0c353", type="biso", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3210,7 +3000,6 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -3220,7 +3009,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn application = await async_client.zero_trust.access.applications.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", @@ -3236,7 +3024,6 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar response = await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3250,7 +3037,6 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo async with async_client.zero_trust.access.applications.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3267,14 +3053,12 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare await async_client.zero_trust.access.applications.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3282,7 +3066,6 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare async def test_method_list(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Application], application, path=["response"]) @@ -3291,7 +3074,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Application], application, path=["response"]) @@ -3300,7 +3082,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -3313,7 +3094,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3329,13 +3109,11 @@ 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.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3344,7 +3122,6 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -3354,7 +3131,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare application = await async_client.zero_trust.access.applications.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ApplicationDeleteResponse], application, path=["response"]) @@ -3364,7 +3140,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -3378,7 +3153,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.applications.with_streaming_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3395,14 +3169,12 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.with_raw_response.delete( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3411,7 +3183,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: application = await async_client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -3421,7 +3192,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - application = await async_client.zero_trust.access.applications.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Application], application, path=["response"]) @@ -3431,7 +3201,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -3445,7 +3214,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.access.applications.with_streaming_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3462,14 +3230,12 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.applications.with_raw_response.get( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -3478,7 +3244,6 @@ 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", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) @@ -3488,7 +3253,6 @@ async def test_method_revoke_tokens_with_all_params(self, async_client: AsyncClo application = await async_client.zero_trust.access.applications.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert_matches_type(object, application, path=["response"]) @@ -3498,7 +3262,6 @@ async def test_raw_response_revoke_tokens(self, async_client: AsyncCloudflare) - response = await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3512,7 +3275,6 @@ async def test_streaming_response_revoke_tokens(self, async_client: AsyncCloudfl async with async_client.zero_trust.access.applications.with_streaming_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3529,12 +3291,10 @@ async def test_path_params_revoke_tokens(self, async_client: AsyncCloudflare) -> await async_client.zero_trust.access.applications.with_raw_response.revoke_tokens( "023e105f4ecef8ad9ca31a8372d0c353", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index dd00efffe9e..6a8e1db3085 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -26,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -37,7 +36,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -49,7 +47,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -64,7 +61,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -82,7 +78,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -90,7 +85,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -100,7 +94,6 @@ def test_method_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -111,7 +104,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -123,7 +115,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -138,7 +129,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -156,7 +146,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -164,7 +153,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -172,7 +160,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -180,7 +167,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) @@ -189,7 +175,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[Certificate], certificate, path=["response"]) @@ -198,7 +183,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.certificates.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -211,7 +195,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.certificates.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -227,13 +210,11 @@ 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.certificates.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -242,7 +223,6 @@ def test_method_delete(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -252,7 +232,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -262,7 +241,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -276,7 +254,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -293,21 +270,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.zero_trust.access.certificates.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -316,7 +290,6 @@ def test_method_get(self, client: Cloudflare) -> None: certificate = client.zero_trust.access.certificates.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -326,7 +299,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -336,7 +308,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -350,7 +321,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -367,21 +337,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.access.certificates.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -395,7 +362,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -406,7 +372,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -418,7 +383,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -433,7 +397,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -451,7 +414,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -459,7 +421,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\nDrUtmu/B\n-----END CERTIFICATE-----", name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -469,7 +430,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -480,7 +440,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", name="Allow devs", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -492,7 +451,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -507,7 +465,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -525,7 +482,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -533,7 +489,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -541,7 +496,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -549,7 +503,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.zero_trust.access.certificates.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) @@ -558,7 +511,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[Certificate], certificate, path=["response"]) @@ -567,7 +519,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -580,7 +531,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -596,13 +546,11 @@ 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.certificates.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -611,7 +559,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -621,7 +568,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare certificate = await async_client.zero_trust.access.certificates.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[CertificateDeleteResponse], certificate, path=["response"]) @@ -631,7 +577,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -645,7 +590,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.certificates.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -662,21 +606,18 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.certificates.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -685,7 +626,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -695,7 +635,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - certificate = await async_client.zero_trust.access.certificates.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Certificate], certificate, path=["response"]) @@ -705,7 +644,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -719,7 +657,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.access.certificates.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -736,19 +673,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.certificates.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index 4c55c3fca81..45d9a1508b3 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -30,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -45,7 +44,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -71,7 +69,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -90,7 +87,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,7 +108,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -124,7 +119,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -139,7 +133,6 @@ def test_method_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -155,7 +148,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -182,7 +174,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -202,7 +193,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -225,7 +215,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -238,7 +227,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -251,7 +239,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -259,7 +246,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -268,7 +254,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -277,7 +262,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.groups.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -290,7 +274,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.groups.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -306,13 +289,11 @@ 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.groups.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -321,7 +302,6 @@ def test_method_delete(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -331,7 +311,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -341,7 +320,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -355,7 +333,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -372,21 +349,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.zero_trust.access.groups.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -395,7 +369,6 @@ def test_method_get(self, client: Cloudflare) -> None: group = client.zero_trust.access.groups.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -405,7 +378,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -415,7 +387,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -429,7 +400,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -446,21 +416,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.access.groups.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -478,7 +445,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -493,7 +459,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -519,7 +484,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -538,7 +502,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -560,7 +523,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -572,7 +534,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -587,7 +548,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -603,7 +563,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], name="Allow devs", account_id="string", - zone_id="string", exclude=[ {"email": {"email": "test@example.com"}}, {"email": {"email": "test@example.com"}}, @@ -630,7 +589,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -650,7 +608,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> ], name="Allow devs", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -673,7 +630,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -686,7 +642,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -699,7 +654,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: ], name="Allow devs", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -707,7 +661,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: group = await async_client.zero_trust.access.groups.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -716,7 +669,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ZeroTrustGroup], group, path=["response"]) @@ -725,7 +677,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -738,7 +689,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -754,13 +704,11 @@ 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.groups.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -769,7 +717,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -779,7 +726,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare group = await async_client.zero_trust.access.groups.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[GroupDeleteResponse], group, path=["response"]) @@ -789,7 +735,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -803,7 +748,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.groups.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -820,21 +764,18 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.groups.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -843,7 +784,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -853,7 +793,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - group = await async_client.zero_trust.access.groups.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ZeroTrustGroup], group, path=["response"]) @@ -863,7 +802,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -877,7 +815,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.access.groups.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -894,19 +831,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.groups.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) 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 b35650734ab..58352082efb 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -26,7 +26,6 @@ def test_method_create(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.create( name="CI/CD token", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -36,7 +35,6 @@ 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", - zone_id="string", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -47,7 +45,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -61,7 +58,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -78,14 +74,12 @@ def test_path_params_create(self, client: Cloudflare) -> None: client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -94,7 +88,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -104,7 +97,6 @@ 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", - zone_id="string", duration="60m", name="CI/CD token", ) @@ -116,7 +108,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -130,7 +121,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,21 +137,18 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.zero_trust.access.service_tokens.with_raw_response.update( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -169,7 +156,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -178,7 +164,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: service_token = client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -187,7 +172,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.access.service_tokens.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -200,7 +184,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.access.service_tokens.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,13 +199,11 @@ 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.service_tokens.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -231,7 +212,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -241,7 +221,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -251,7 +230,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -265,7 +243,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -282,21 +259,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.zero_trust.access.service_tokens.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -413,7 +387,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -423,7 +396,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare service_token = await async_client.zero_trust.access.service_tokens.create( name="CI/CD token", account_id="string", - zone_id="string", duration="60m", ) assert_matches_type(Optional[ServiceTokenCreateResponse], service_token, path=["response"]) @@ -434,7 +406,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -448,7 +419,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.service_tokens.with_streaming_response.create( name="CI/CD token", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -465,14 +435,12 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.service_tokens.with_raw_response.create( name="CI/CD token", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -481,7 +449,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -491,7 +458,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare service_token = await async_client.zero_trust.access.service_tokens.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", duration="60m", name="CI/CD token", ) @@ -503,7 +469,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -517,7 +482,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.service_tokens.with_streaming_response.update( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -534,21 +498,18 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.service_tokens.with_raw_response.update( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -556,7 +517,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: service_token = await async_client.zero_trust.access.service_tokens.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -565,7 +525,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[ServiceToken], service_token, path=["response"]) @@ -574,7 +533,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -587,7 +545,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -603,13 +560,11 @@ 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.service_tokens.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -618,7 +573,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -628,7 +582,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare service_token = await async_client.zero_trust.access.service_tokens.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[ServiceToken], service_token, path=["response"]) @@ -638,7 +591,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -652,7 +604,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.access.service_tokens.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -669,21 +620,18 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.access.service_tokens.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index 82ace384f03..f19d50b5320 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -28,7 +28,6 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -49,7 +48,6 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -68,7 +66,6 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -84,7 +81,6 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -103,7 +99,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -112,7 +107,6 @@ def test_path_params_create_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -123,7 +117,6 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -142,7 +135,6 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -161,7 +153,6 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -177,7 +168,6 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,7 +186,6 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -205,7 +194,6 @@ def test_path_params_create_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -216,7 +204,6 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -231,7 +218,6 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -250,7 +236,6 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -266,7 +251,6 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -285,7 +269,6 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -294,7 +277,6 @@ def test_path_params_create_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -305,7 +287,6 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -320,7 +301,6 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -339,7 +319,6 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -355,7 +334,6 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -374,7 +352,6 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -383,7 +360,6 @@ def test_path_params_create_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -394,7 +370,6 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -411,7 +386,6 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -430,7 +404,6 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -446,7 +419,6 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -465,7 +437,6 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -474,7 +445,6 @@ def test_path_params_create_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -485,7 +455,6 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -503,7 +472,6 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -522,7 +490,6 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -538,7 +505,6 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -557,7 +523,6 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -566,7 +531,6 @@ def test_path_params_create_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -577,7 +541,6 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -592,7 +555,6 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -611,7 +573,6 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -627,7 +588,6 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -646,7 +606,6 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -655,7 +614,6 @@ def test_path_params_create_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -666,7 +624,6 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -687,7 +644,6 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -706,7 +662,6 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -722,7 +677,6 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -741,7 +695,6 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -750,7 +703,6 @@ def test_path_params_create_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -761,7 +713,6 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -780,7 +731,6 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -799,7 +749,6 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -815,7 +764,6 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -834,7 +782,6 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -843,7 +790,6 @@ def test_path_params_create_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -854,7 +800,6 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -872,7 +817,6 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -891,7 +835,6 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -907,7 +850,6 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -926,7 +868,6 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -935,7 +876,6 @@ def test_path_params_create_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -946,7 +886,6 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -964,7 +903,6 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -983,7 +921,6 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -999,7 +936,6 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1018,7 +954,6 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1027,7 +962,6 @@ def test_path_params_create_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1038,7 +972,6 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1071,7 +1004,6 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1090,7 +1022,6 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1106,7 +1037,6 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1125,7 +1055,6 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1134,7 +1063,6 @@ def test_path_params_create_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1145,7 +1073,6 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1160,7 +1087,6 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1179,7 +1105,6 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1195,7 +1120,6 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1214,7 +1138,6 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1223,7 +1146,6 @@ def test_path_params_create_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1234,7 +1156,6 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1246,7 +1167,6 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1265,7 +1185,6 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1281,7 +1200,6 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1300,7 +1218,6 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1309,7 +1226,6 @@ def test_path_params_create_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1321,7 +1237,6 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1343,7 +1258,6 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1363,7 +1277,6 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1380,7 +1293,6 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1400,7 +1312,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1410,7 +1321,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1420,7 +1330,6 @@ def test_path_params_update_overload_1(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1432,7 +1341,6 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1452,7 +1360,6 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1472,7 +1379,6 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1489,7 +1395,6 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1509,7 +1414,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1519,7 +1423,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1529,7 +1432,6 @@ def test_path_params_update_overload_2(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1541,7 +1443,6 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1557,7 +1458,6 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1577,7 +1477,6 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1594,7 +1493,6 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1614,7 +1512,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1624,7 +1521,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1634,7 +1530,6 @@ def test_path_params_update_overload_3(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1646,7 +1541,6 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1662,7 +1556,6 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1682,7 +1575,6 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1699,7 +1591,6 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1719,7 +1610,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1729,7 +1619,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1739,7 +1628,6 @@ def test_path_params_update_overload_4(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1751,7 +1639,6 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1769,7 +1656,6 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1789,7 +1675,6 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1806,7 +1691,6 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1826,7 +1710,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1836,7 +1719,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1846,7 +1728,6 @@ def test_path_params_update_overload_5(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1858,7 +1739,6 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1877,7 +1757,6 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -1897,7 +1776,6 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -1914,7 +1792,6 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1934,7 +1811,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -1944,7 +1820,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -1954,7 +1829,6 @@ def test_path_params_update_overload_6(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -1966,7 +1840,6 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -1982,7 +1855,6 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2002,7 +1874,6 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2019,7 +1890,6 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2039,7 +1909,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2049,7 +1918,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2059,7 +1927,6 @@ def test_path_params_update_overload_7(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2071,7 +1938,6 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2093,7 +1959,6 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2113,7 +1978,6 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2130,7 +1994,6 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2150,7 +2013,6 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2160,7 +2022,6 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2170,7 +2031,6 @@ def test_path_params_update_overload_8(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2182,7 +2042,6 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2202,7 +2061,6 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2222,7 +2080,6 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2239,7 +2096,6 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2259,7 +2115,6 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2269,7 +2124,6 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2279,7 +2133,6 @@ def test_path_params_update_overload_9(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2291,7 +2144,6 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2310,7 +2162,6 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2330,7 +2181,6 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2347,7 +2197,6 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2367,7 +2216,6 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2377,7 +2225,6 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2387,7 +2234,6 @@ def test_path_params_update_overload_10(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2399,7 +2245,6 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2418,7 +2263,6 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2438,7 +2282,6 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2455,7 +2298,6 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2475,7 +2317,6 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2485,7 +2326,6 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2495,7 +2335,6 @@ def test_path_params_update_overload_11(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2507,7 +2346,6 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2541,7 +2379,6 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2561,7 +2398,6 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2578,7 +2414,6 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2598,7 +2433,6 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2608,7 +2442,6 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2618,7 +2451,6 @@ def test_path_params_update_overload_12(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2630,7 +2462,6 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2646,7 +2477,6 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2666,7 +2496,6 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2683,7 +2512,6 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2703,7 +2531,6 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2713,7 +2540,6 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2723,7 +2549,6 @@ def test_path_params_update_overload_13(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2735,7 +2560,6 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2748,7 +2572,6 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -2768,7 +2591,6 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2785,7 +2607,6 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2805,7 +2626,6 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -2815,7 +2635,6 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -2825,7 +2644,6 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -2833,7 +2651,6 @@ def test_path_params_update_overload_14(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -2842,7 +2659,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -2851,7 +2667,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.identity_providers.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -2864,7 +2679,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.identity_providers.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2880,13 +2694,11 @@ 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.identity_providers.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2895,7 +2707,6 @@ def test_method_delete(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -2905,7 +2716,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -2915,7 +2725,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -2929,7 +2738,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2946,21 +2754,18 @@ def test_path_params_delete(self, client: Cloudflare) -> None: client.zero_trust.identity_providers.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -2969,7 +2774,6 @@ def test_method_get(self, client: Cloudflare) -> None: identity_provider = client.zero_trust.identity_providers.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2979,7 +2783,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -2989,7 +2792,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -3003,7 +2805,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3020,21 +2821,18 @@ def test_path_params_get(self, client: Cloudflare) -> None: client.zero_trust.identity_providers.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -3049,7 +2847,6 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3070,7 +2867,6 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3089,7 +2885,6 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3105,7 +2900,6 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3124,7 +2918,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3133,7 +2926,6 @@ async def test_path_params_create_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3144,7 +2936,6 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3163,7 +2954,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3182,7 +2972,6 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3198,7 +2987,6 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3217,7 +3005,6 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3226,7 +3013,6 @@ async def test_path_params_create_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3237,7 +3023,6 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3252,7 +3037,6 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3271,7 +3055,6 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3287,7 +3070,6 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3306,7 +3088,6 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3315,7 +3096,6 @@ async def test_path_params_create_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3326,7 +3106,6 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3341,7 +3120,6 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3360,7 +3138,6 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3376,7 +3153,6 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3395,7 +3171,6 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3404,7 +3179,6 @@ async def test_path_params_create_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3415,7 +3189,6 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3432,7 +3205,6 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3451,7 +3223,6 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3467,7 +3238,6 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3486,7 +3256,6 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3495,7 +3264,6 @@ async def test_path_params_create_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3506,7 +3274,6 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3524,7 +3291,6 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3543,7 +3309,6 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3559,7 +3324,6 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3578,7 +3342,6 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3587,7 +3350,6 @@ async def test_path_params_create_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3598,7 +3360,6 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3613,7 +3374,6 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3632,7 +3392,6 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3648,7 +3407,6 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3667,7 +3425,6 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3676,7 +3433,6 @@ async def test_path_params_create_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3687,7 +3443,6 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3708,7 +3463,6 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3727,7 +3481,6 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3743,7 +3496,6 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3762,7 +3514,6 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3771,7 +3522,6 @@ async def test_path_params_create_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3782,7 +3532,6 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3801,7 +3550,6 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3820,7 +3568,6 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3836,7 +3583,6 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3855,7 +3601,6 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3864,7 +3609,6 @@ async def test_path_params_create_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3875,7 +3619,6 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3893,7 +3636,6 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -3912,7 +3654,6 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -3928,7 +3669,6 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -3947,7 +3687,6 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -3956,7 +3695,6 @@ async def test_path_params_create_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -3967,7 +3705,6 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -3985,7 +3722,6 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4004,7 +3740,6 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4020,7 +3755,6 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4039,7 +3773,6 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4048,7 +3781,6 @@ async def test_path_params_create_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4059,7 +3791,6 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4092,7 +3823,6 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4111,7 +3841,6 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4127,7 +3856,6 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4146,7 +3874,6 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4155,7 +3882,6 @@ async def test_path_params_create_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4166,7 +3892,6 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4181,7 +3906,6 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4200,7 +3924,6 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4216,7 +3939,6 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4235,7 +3957,6 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4244,7 +3965,6 @@ async def test_path_params_create_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4255,7 +3975,6 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4267,7 +3986,6 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4286,7 +4004,6 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4302,7 +4019,6 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4321,7 +4037,6 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4330,7 +4045,6 @@ async def test_path_params_create_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4342,7 +4056,6 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4364,7 +4077,6 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4384,7 +4096,6 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4401,7 +4112,6 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4421,7 +4131,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4431,7 +4140,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4441,7 +4149,6 @@ async def test_path_params_update_overload_1(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4453,7 +4160,6 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4473,7 +4179,6 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4493,7 +4198,6 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4510,7 +4214,6 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4530,7 +4233,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4540,7 +4242,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4550,7 +4251,6 @@ async def test_path_params_update_overload_2(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4562,7 +4262,6 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4578,7 +4277,6 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4598,7 +4296,6 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4615,7 +4312,6 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4635,7 +4331,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4645,7 +4340,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4655,7 +4349,6 @@ async def test_path_params_update_overload_3(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4667,7 +4360,6 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4683,7 +4375,6 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4703,7 +4394,6 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4720,7 +4410,6 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4740,7 +4429,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4750,7 +4438,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4760,7 +4447,6 @@ async def test_path_params_update_overload_4(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4772,7 +4458,6 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4790,7 +4475,6 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4810,7 +4494,6 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4827,7 +4510,6 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4847,7 +4529,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4857,7 +4538,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4867,7 +4547,6 @@ async def test_path_params_update_overload_5(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4879,7 +4558,6 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -4898,7 +4576,6 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -4918,7 +4595,6 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -4935,7 +4611,6 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -4955,7 +4630,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -4965,7 +4639,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -4975,7 +4648,6 @@ async def test_path_params_update_overload_6(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -4987,7 +4659,6 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5003,7 +4674,6 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5023,7 +4693,6 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5040,7 +4709,6 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5060,7 +4728,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5070,7 +4737,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5080,7 +4746,6 @@ async def test_path_params_update_overload_7(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5092,7 +4757,6 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5114,7 +4778,6 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5134,7 +4797,6 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5151,7 +4813,6 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5171,7 +4832,6 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5181,7 +4841,6 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5191,7 +4850,6 @@ async def test_path_params_update_overload_8(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5203,7 +4861,6 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5223,7 +4880,6 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5243,7 +4899,6 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5260,7 +4915,6 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5280,7 +4934,6 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5290,7 +4943,6 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5300,7 +4952,6 @@ async def test_path_params_update_overload_9(self, async_client: AsyncCloudflare name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5312,7 +4963,6 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5331,7 +4981,6 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5351,7 +5000,6 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5368,7 +5016,6 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5388,7 +5035,6 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5398,7 +5044,6 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5408,7 +5053,6 @@ async def test_path_params_update_overload_10(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5420,7 +5064,6 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5439,7 +5082,6 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5459,7 +5101,6 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5476,7 +5117,6 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5496,7 +5136,6 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5506,7 +5145,6 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5516,7 +5154,6 @@ async def test_path_params_update_overload_11(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5528,7 +5165,6 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5562,7 +5198,6 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5582,7 +5217,6 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5599,7 +5233,6 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5619,7 +5252,6 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5629,7 +5261,6 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5639,7 +5270,6 @@ async def test_path_params_update_overload_12(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5651,7 +5281,6 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5667,7 +5296,6 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5687,7 +5315,6 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5704,7 +5331,6 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5724,7 +5350,6 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5734,7 +5359,6 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5744,7 +5368,6 @@ async def test_path_params_update_overload_13(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5756,7 +5379,6 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -5769,7 +5391,6 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", scim_config={ "enabled": True, "group_member_deprovision": True, @@ -5789,7 +5410,6 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -5806,7 +5426,6 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5826,7 +5445,6 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -5836,7 +5454,6 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -5846,7 +5463,6 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar name="Widget Corps IDP", type="onetimepin", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -5854,7 +5470,6 @@ async def test_path_params_update_overload_14(self, async_client: AsyncCloudflar async def test_method_list(self, async_client: AsyncCloudflare) -> None: identity_provider = await async_client.zero_trust.identity_providers.list( account_id="string", - zone_id="string", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -5863,7 +5478,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @@ -5872,7 +5486,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -5885,7 +5498,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5901,13 +5513,11 @@ 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.identity_providers.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -5916,7 +5526,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -5926,7 +5535,6 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare identity_provider = await async_client.zero_trust.identity_providers.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProviderDeleteResponse], identity_provider, path=["response"]) @@ -5936,7 +5544,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -5950,7 +5557,6 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> async with async_client.zero_trust.identity_providers.with_streaming_response.delete( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -5967,21 +5573,18 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.identity_providers.with_raw_response.delete( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -5990,7 +5593,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -6000,7 +5602,6 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - identity_provider = await async_client.zero_trust.identity_providers.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) assert_matches_type(Optional[IdentityProvider], identity_provider, path=["response"]) @@ -6010,7 +5611,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -6024,7 +5624,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No async with async_client.zero_trust.identity_providers.with_streaming_response.get( "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -6041,19 +5640,16 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: await async_client.zero_trust.identity_providers.with_raw_response.get( "", account_id="string", - zone_id="string", ) 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", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index 8610b2484c8..9f9c1b87e81 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -25,7 +25,6 @@ def test_method_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -36,7 +35,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -61,7 +59,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -76,7 +73,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -94,7 +90,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -102,7 +97,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -110,7 +104,6 @@ def test_path_params_create(self, client: Cloudflare) -> None: def test_method_update(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -119,7 +112,6 @@ def test_method_update(self, client: Cloudflare) -> None: def test_method_update_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.update( account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -148,7 +140,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_update(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.update( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -161,7 +152,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None: def test_streaming_response_update(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.update( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -177,13 +167,11 @@ 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.organizations.with_raw_response.update( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -191,7 +179,6 @@ def test_path_params_update(self, client: Cloudflare) -> None: def test_method_list(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -200,7 +187,6 @@ def test_method_list(self, client: Cloudflare) -> None: def test_method_list_with_all_params(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -209,7 +195,6 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_list(self, client: Cloudflare) -> None: response = client.zero_trust.organizations.with_raw_response.list( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -222,7 +207,6 @@ def test_raw_response_list(self, client: Cloudflare) -> None: def test_streaming_response_list(self, client: Cloudflare) -> None: with client.zero_trust.organizations.with_streaming_response.list( account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -238,13 +222,11 @@ 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.organizations.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -253,7 +235,6 @@ def test_method_revoke_users(self, client: Cloudflare) -> None: organization = client.zero_trust.organizations.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -263,7 +244,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -273,7 +253,6 @@ 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", - zone_id="string", ) assert response.is_closed is True @@ -287,7 +266,6 @@ 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -304,14 +282,12 @@ def test_path_params_revoke_users(self, client: Cloudflare) -> None: client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="", - zone_id="string", ) 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", - zone_id="", ) @@ -325,7 +301,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -336,7 +311,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auto_redirect_to_identity=True, is_ui_read_only=True, @@ -361,7 +335,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -376,7 +349,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -394,7 +366,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="", - zone_id="string", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): @@ -402,7 +373,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: auth_domain="test.cloudflareaccess.com", name="Widget Corps Internal Applications", account_id="string", - zone_id="", ) @pytest.mark.skip() @@ -410,7 +380,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: async def test_method_update(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -419,7 +388,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.update( account_id="string", - zone_id="string", allow_authenticate_via_warp=True, auth_domain="test.cloudflareaccess.com", auto_redirect_to_identity=True, @@ -448,7 +416,6 @@ 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.zero_trust.organizations.with_raw_response.update( account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -461,7 +428,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -477,13 +443,11 @@ 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.organizations.with_raw_response.update( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -491,7 +455,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: async def test_method_list(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -500,7 +463,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: organization = await async_client.zero_trust.organizations.list( account_id="string", - zone_id="string", ) assert_matches_type(Optional[Organization], organization, path=["response"]) @@ -509,7 +471,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) 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", - zone_id="string", ) assert response.is_closed is True @@ -522,7 +483,6 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: 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", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -538,13 +498,11 @@ 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.organizations.with_raw_response.list( account_id="", - zone_id="string", ) 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", - zone_id="", ) @pytest.mark.skip() @@ -553,7 +511,6 @@ 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", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -563,7 +520,6 @@ async def test_method_revoke_users_with_all_params(self, async_client: AsyncClou organization = await async_client.zero_trust.organizations.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert_matches_type(Optional[OrganizationRevokeUsersResponse], organization, path=["response"]) @@ -573,7 +529,6 @@ async def test_raw_response_revoke_users(self, async_client: AsyncCloudflare) -> response = await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) assert response.is_closed is True @@ -587,7 +542,6 @@ async def test_streaming_response_revoke_users(self, async_client: AsyncCloudfla async with async_client.zero_trust.organizations.with_streaming_response.revoke_users( email="test@example.com", account_id="string", - zone_id="string", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -604,12 +558,10 @@ async def test_path_params_revoke_users(self, async_client: AsyncCloudflare) -> await async_client.zero_trust.organizations.with_raw_response.revoke_users( email="test@example.com", account_id="", - zone_id="string", ) 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", - zone_id="", ) diff --git a/tests/utils.py b/tests/utils.py index f243a4ef8a5..f726a828ad7 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -97,7 +97,22 @@ def assert_matches_type( assert_matches_type(key_type, key, path=[*path, ""]) assert_matches_type(items_type, item, path=[*path, ""]) elif is_union_type(type_): - for i, variant in enumerate(get_args(type_)): + variants = get_args(type_) + + try: + none_index = variants.index(type(None)) + except ValueError: + pass + else: + # special case Optional[T] for better error messages + if len(variants) == 2: + if value is None: + # valid + return + + return assert_matches_type(type_=variants[not none_index], value=value, path=path) + + for i, variant in enumerate(variants): try: assert_matches_type(variant, value, path=[*path, f"variant {i}"]) return