From cd90315b692573711bddadc55e121135180b20ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 00:20:10 +0000 Subject: [PATCH] test(threat_events): skip HTTP 401 prism issues for pythin --- .stats.yml | 4 +- api.md | 45 +++- .../cloudforce_one/scans/__init__.py | 14 + .../resources/cloudforce_one/scans/config.py | 243 +++++++++++++++++- .../resources/cloudforce_one/scans/results.py | 188 ++++++++++++++ .../resources/cloudforce_one/scans/scans.py | 32 +++ .../cloudforce_one/threat_events/__init__.py | 12 +- .../cloudforce_one/threat_events/insights.py | 120 ++++----- .../threat_events/threat_events.py | 48 ++-- .../resources/origin_ca_certificates.py | 4 +- .../types/cloudforce_one/scans/__init__.py | 4 + .../scans/config_create_response.py | 12 + .../scans/config_edit_params.py | 30 +++ .../scans/config_edit_response.py | 31 +++ .../scans/config_list_response.py | 12 + .../scans/result_get_response.py | 14 + .../types/cloudforce_one/scans/scan_result.py | 15 ++ .../cloudforce_one/threat_events/__init__.py | 4 +- ...eat_params.py => insight_create_params.py} | 4 +- ...response.py => insight_create_response.py} | 4 +- .../origin_ca_certificate_list_params.py | 4 +- .../cloudforce_one/scans/test_config.py | 240 ++++++++++++++++- .../cloudforce_one/scans/test_results.py | 118 +++++++++ .../cloudforce_one/test_threat_events.py | 40 +++ .../threat_events/test_attackers.py | 6 + .../threat_events/test_categories.py | 40 +++ .../threat_events/test_countries.py | 6 + .../threat_events/test_crons.py | 12 + .../threat_events/test_datasets.py | 36 +++ .../threat_events/test_event_tags.py | 16 ++ .../threat_events/test_indicator_types.py | 6 + .../threat_events/test_insights.py | 206 ++++++++------- .../cloudforce_one/threat_events/test_raw.py | 18 ++ .../threat_events/test_relate.py | 8 + .../cloudforce_one/threat_events/test_tags.py | 6 + .../threat_events/test_target_industries.py | 6 + .../security_center/test_insights.py | 20 ++ tests/api_resources/test_custom_pages.py | 30 +++ .../test_origin_ca_certificates.py | 28 +- 39 files changed, 1456 insertions(+), 230 deletions(-) create mode 100644 src/cloudflare/resources/cloudforce_one/scans/results.py create mode 100644 src/cloudflare/types/cloudforce_one/scans/config_edit_params.py create mode 100644 src/cloudflare/types/cloudforce_one/scans/config_edit_response.py create mode 100644 src/cloudflare/types/cloudforce_one/scans/result_get_response.py create mode 100644 src/cloudflare/types/cloudforce_one/scans/scan_result.py rename src/cloudflare/types/cloudforce_one/threat_events/{insight_creat_params.py => insight_create_params.py} (75%) rename src/cloudflare/types/cloudforce_one/threat_events/{insight_creat_response.py => insight_create_response.py} (67%) create mode 100644 tests/api_resources/cloudforce_one/scans/test_results.py diff --git a/.stats.yml b/.stats.yml index 112489ebaed..8430ac4dc55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 1608 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9129193d19a2c3346f2773a2a8bab4b29d953f6daa031be766c1986f5a87241e.yml +configured_endpoints: 1611 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8103ad52977aa9c1ce4655e2afd3ade7f6e891aafaa9bd1fbf4630348bc3fd02.yml diff --git a/api.md b/api.md index fe2293e1ab4..1c5359edcbc 100644 --- a/api.md +++ b/api.md @@ -8377,18 +8377,37 @@ Methods: ## Scans +### Results + +Types: + +```python +from cloudflare.types.cloudforce_one.scans import ScanResult, ResultGetResponse +``` + +Methods: + +- client.cloudforce_one.scans.results.get(config_id, \*, account_id) -> ResultGetResponse + ### Config Types: ```python -from cloudflare.types.cloudforce_one.scans import ConfigCreateResponse, ConfigListResponse +from cloudflare.types.cloudforce_one.scans import ( + ConfigCreateResponse, + ConfigListResponse, + ConfigDeleteResponse, + ConfigEditResponse, +) ``` Methods: - client.cloudforce_one.scans.config.create(\*, account_id, \*\*params) -> Optional[ConfigCreateResponse] - client.cloudforce_one.scans.config.list(\*, account_id) -> SyncSinglePage[ConfigListResponse] +- client.cloudforce_one.scans.config.delete(config_id, \*, account_id) -> object +- client.cloudforce_one.scans.config.edit(config_id, \*, account_id, \*\*params) -> Optional[ConfigEditResponse] ## Requests @@ -8613,33 +8632,33 @@ Methods: - client.cloudforce_one.threat_events.relate.delete(event_id, \*, account_id) -> RelateDeleteResponse -### EventTags +### Tags Types: ```python -from cloudflare.types.cloudforce_one.threat_events import ( - EventTagCreateResponse, - EventTagDeleteResponse, -) +from cloudflare.types.cloudforce_one.threat_events import TagCreateResponse ``` Methods: -- client.cloudforce_one.threat_events.event_tags.create(event_id, \*, account_id, \*\*params) -> EventTagCreateResponse -- client.cloudforce_one.threat_events.event_tags.delete(event_id, \*, account_id) -> EventTagDeleteResponse +- client.cloudforce_one.threat_events.tags.create(\*, account_id, \*\*params) -> TagCreateResponse -### Tags +### EventTags Types: ```python -from cloudflare.types.cloudforce_one.threat_events import TagCreateResponse +from cloudflare.types.cloudforce_one.threat_events import ( + EventTagCreateResponse, + EventTagDeleteResponse, +) ``` Methods: -- client.cloudforce_one.threat_events.tags.create(\*, account_id, \*\*params) -> TagCreateResponse +- client.cloudforce_one.threat_events.event_tags.create(event_id, \*, account_id, \*\*params) -> EventTagCreateResponse +- client.cloudforce_one.threat_events.event_tags.delete(event_id, \*, account_id) -> EventTagDeleteResponse ### TargetIndustries @@ -8659,8 +8678,8 @@ Types: ```python from cloudflare.types.cloudforce_one.threat_events import ( + InsightCreateResponse, InsightDeleteResponse, - InsightCreatResponse, InsightEditResponse, InsightGetResponse, ) @@ -8668,8 +8687,8 @@ from cloudflare.types.cloudforce_one.threat_events import ( Methods: +- client.cloudforce_one.threat_events.insights.create(event_id, \*, account_id, \*\*params) -> InsightCreateResponse - client.cloudforce_one.threat_events.insights.delete(insight_id, \*, account_id, event_id) -> InsightDeleteResponse -- client.cloudforce_one.threat_events.insights.creat(event_id, \*, account_id, \*\*params) -> InsightCreatResponse - client.cloudforce_one.threat_events.insights.edit(insight_id, \*, account_id, event_id, \*\*params) -> InsightEditResponse - client.cloudforce_one.threat_events.insights.get(insight_id, \*, account_id, event_id) -> InsightGetResponse diff --git a/src/cloudflare/resources/cloudforce_one/scans/__init__.py b/src/cloudflare/resources/cloudforce_one/scans/__init__.py index 0b953b0fc64..3f5bf4ecaaa 100644 --- a/src/cloudflare/resources/cloudforce_one/scans/__init__.py +++ b/src/cloudflare/resources/cloudforce_one/scans/__init__.py @@ -16,8 +16,22 @@ ConfigResourceWithStreamingResponse, AsyncConfigResourceWithStreamingResponse, ) +from .results import ( + ResultsResource, + AsyncResultsResource, + ResultsResourceWithRawResponse, + AsyncResultsResourceWithRawResponse, + ResultsResourceWithStreamingResponse, + AsyncResultsResourceWithStreamingResponse, +) __all__ = [ + "ResultsResource", + "AsyncResultsResource", + "ResultsResourceWithRawResponse", + "AsyncResultsResourceWithRawResponse", + "ResultsResourceWithStreamingResponse", + "AsyncResultsResourceWithStreamingResponse", "ConfigResource", "AsyncConfigResource", "ConfigResourceWithRawResponse", diff --git a/src/cloudflare/resources/cloudforce_one/scans/config.py b/src/cloudflare/resources/cloudforce_one/scans/config.py index f93e9e6f527..20ce1ade4a0 100644 --- a/src/cloudflare/resources/cloudforce_one/scans/config.py +++ b/src/cloudflare/resources/cloudforce_one/scans/config.py @@ -22,7 +22,8 @@ from ...._wrappers import ResultWrapper from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import AsyncPaginator, make_request_options -from ....types.cloudforce_one.scans import config_create_params +from ....types.cloudforce_one.scans import config_edit_params, config_create_params +from ....types.cloudforce_one.scans.config_edit_response import ConfigEditResponse from ....types.cloudforce_one.scans.config_list_response import ConfigListResponse from ....types.cloudforce_one.scans.config_create_response import ConfigCreateResponse @@ -144,6 +145,114 @@ def list( model=ConfigListResponse, ) + def delete( + self, + config_id: str, + *, + 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Delete a Scan Config + + Args: + account_id: Account ID + + config_id: Config ID + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + 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 config_id: + raise ValueError(f"Expected a non-empty value for `config_id` but received {config_id!r}") + return self._delete( + f"/accounts/{account_id}/cloudforce-one/scans/config/{config_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[object]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + def edit( + self, + config_id: str, + *, + account_id: str, + frequency: float | NotGiven = NOT_GIVEN, + ips: List[str] | NotGiven = NOT_GIVEN, + ports: List[str] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[ConfigEditResponse]: + """ + Update an existing Scan Config + + Args: + account_id: Account ID + + config_id: Config ID + + frequency: The number of days between each scan (0 = no recurring scans). + + ips: A list of IP addresses or CIDR blocks to scan. The maximum number of total IP + addresses allowed is 5000. + + ports: A list of ports to scan. Allowed values:"default", "all", or a comma-separated + list of ports or range of ports (e.g. ["1-80", "443"]). Default will scan the + 100 most commonly open ports. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + 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 config_id: + raise ValueError(f"Expected a non-empty value for `config_id` but received {config_id!r}") + return self._patch( + f"/accounts/{account_id}/cloudforce-one/scans/config/{config_id}", + body=maybe_transform( + { + "frequency": frequency, + "ips": ips, + "ports": ports, + }, + config_edit_params.ConfigEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[ConfigEditResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[ConfigEditResponse]], ResultWrapper[ConfigEditResponse]), + ) + class AsyncConfigResource(AsyncAPIResource): @cached_property @@ -260,6 +369,114 @@ def list( model=ConfigListResponse, ) + async def delete( + self, + config_id: str, + *, + 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> object: + """ + Delete a Scan Config + + Args: + account_id: Account ID + + config_id: Config ID + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + 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 config_id: + raise ValueError(f"Expected a non-empty value for `config_id` but received {config_id!r}") + return await self._delete( + f"/accounts/{account_id}/cloudforce-one/scans/config/{config_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[object]._unwrapper, + ), + cast_to=cast(Type[object], ResultWrapper[object]), + ) + + async def edit( + self, + config_id: str, + *, + account_id: str, + frequency: float | NotGiven = NOT_GIVEN, + ips: List[str] | NotGiven = NOT_GIVEN, + ports: List[str] | NotGiven = NOT_GIVEN, + # 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Optional[ConfigEditResponse]: + """ + Update an existing Scan Config + + Args: + account_id: Account ID + + config_id: Config ID + + frequency: The number of days between each scan (0 = no recurring scans). + + ips: A list of IP addresses or CIDR blocks to scan. The maximum number of total IP + addresses allowed is 5000. + + ports: A list of ports to scan. Allowed values:"default", "all", or a comma-separated + list of ports or range of ports (e.g. ["1-80", "443"]). Default will scan the + 100 most commonly open ports. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + 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 config_id: + raise ValueError(f"Expected a non-empty value for `config_id` but received {config_id!r}") + return await self._patch( + f"/accounts/{account_id}/cloudforce-one/scans/config/{config_id}", + body=await async_maybe_transform( + { + "frequency": frequency, + "ips": ips, + "ports": ports, + }, + config_edit_params.ConfigEditParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[Optional[ConfigEditResponse]]._unwrapper, + ), + cast_to=cast(Type[Optional[ConfigEditResponse]], ResultWrapper[ConfigEditResponse]), + ) + class ConfigResourceWithRawResponse: def __init__(self, config: ConfigResource) -> None: @@ -271,6 +488,12 @@ def __init__(self, config: ConfigResource) -> None: self.list = to_raw_response_wrapper( config.list, ) + self.delete = to_raw_response_wrapper( + config.delete, + ) + self.edit = to_raw_response_wrapper( + config.edit, + ) class AsyncConfigResourceWithRawResponse: @@ -283,6 +506,12 @@ def __init__(self, config: AsyncConfigResource) -> None: self.list = async_to_raw_response_wrapper( config.list, ) + self.delete = async_to_raw_response_wrapper( + config.delete, + ) + self.edit = async_to_raw_response_wrapper( + config.edit, + ) class ConfigResourceWithStreamingResponse: @@ -295,6 +524,12 @@ def __init__(self, config: ConfigResource) -> None: self.list = to_streamed_response_wrapper( config.list, ) + self.delete = to_streamed_response_wrapper( + config.delete, + ) + self.edit = to_streamed_response_wrapper( + config.edit, + ) class AsyncConfigResourceWithStreamingResponse: @@ -307,3 +542,9 @@ def __init__(self, config: AsyncConfigResource) -> None: self.list = async_to_streamed_response_wrapper( config.list, ) + self.delete = async_to_streamed_response_wrapper( + config.delete, + ) + self.edit = async_to_streamed_response_wrapper( + config.edit, + ) diff --git a/src/cloudflare/resources/cloudforce_one/scans/results.py b/src/cloudflare/resources/cloudforce_one/scans/results.py new file mode 100644 index 00000000000..d884f66a845 --- /dev/null +++ b/src/cloudflare/resources/cloudforce_one/scans/results.py @@ -0,0 +1,188 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Type, cast + +import httpx + +from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ...._wrappers import ResultWrapper +from ...._base_client import make_request_options +from ....types.cloudforce_one.scans.result_get_response import ResultGetResponse + +__all__ = ["ResultsResource", "AsyncResultsResource"] + + +class ResultsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> ResultsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return ResultsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> ResultsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return ResultsResourceWithStreamingResponse(self) + + def get( + self, + config_id: str, + *, + 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ResultGetResponse: + """ + Get the Latest Scan Result + + Args: + account_id: Account ID + + config_id: Config ID + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + 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 config_id: + raise ValueError(f"Expected a non-empty value for `config_id` but received {config_id!r}") + return self._get( + f"/accounts/{account_id}/cloudforce-one/scans/results/{config_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ResultGetResponse]._unwrapper, + ), + cast_to=cast(Type[ResultGetResponse], ResultWrapper[ResultGetResponse]), + ) + + +class AsyncResultsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncResultsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers + """ + return AsyncResultsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncResultsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response + """ + return AsyncResultsResourceWithStreamingResponse(self) + + async def get( + self, + config_id: str, + *, + 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, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> ResultGetResponse: + """ + Get the Latest Scan Result + + Args: + account_id: Account ID + + config_id: Config ID + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + 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 config_id: + raise ValueError(f"Expected a non-empty value for `config_id` but received {config_id!r}") + return await self._get( + f"/accounts/{account_id}/cloudforce-one/scans/results/{config_id}", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + post_parser=ResultWrapper[ResultGetResponse]._unwrapper, + ), + cast_to=cast(Type[ResultGetResponse], ResultWrapper[ResultGetResponse]), + ) + + +class ResultsResourceWithRawResponse: + def __init__(self, results: ResultsResource) -> None: + self._results = results + + self.get = to_raw_response_wrapper( + results.get, + ) + + +class AsyncResultsResourceWithRawResponse: + def __init__(self, results: AsyncResultsResource) -> None: + self._results = results + + self.get = async_to_raw_response_wrapper( + results.get, + ) + + +class ResultsResourceWithStreamingResponse: + def __init__(self, results: ResultsResource) -> None: + self._results = results + + self.get = to_streamed_response_wrapper( + results.get, + ) + + +class AsyncResultsResourceWithStreamingResponse: + def __init__(self, results: AsyncResultsResource) -> None: + self._results = results + + self.get = async_to_streamed_response_wrapper( + results.get, + ) diff --git a/src/cloudflare/resources/cloudforce_one/scans/scans.py b/src/cloudflare/resources/cloudforce_one/scans/scans.py index ad81bf1b2d6..ce6f9039bf9 100644 --- a/src/cloudflare/resources/cloudforce_one/scans/scans.py +++ b/src/cloudflare/resources/cloudforce_one/scans/scans.py @@ -10,6 +10,14 @@ ConfigResourceWithStreamingResponse, AsyncConfigResourceWithStreamingResponse, ) +from .results import ( + ResultsResource, + AsyncResultsResource, + ResultsResourceWithRawResponse, + AsyncResultsResourceWithRawResponse, + ResultsResourceWithStreamingResponse, + AsyncResultsResourceWithStreamingResponse, +) from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -17,6 +25,10 @@ class ScansResource(SyncAPIResource): + @cached_property + def results(self) -> ResultsResource: + return ResultsResource(self._client) + @cached_property def config(self) -> ConfigResource: return ConfigResource(self._client) @@ -42,6 +54,10 @@ def with_streaming_response(self) -> ScansResourceWithStreamingResponse: class AsyncScansResource(AsyncAPIResource): + @cached_property + def results(self) -> AsyncResultsResource: + return AsyncResultsResource(self._client) + @cached_property def config(self) -> AsyncConfigResource: return AsyncConfigResource(self._client) @@ -70,6 +86,10 @@ class ScansResourceWithRawResponse: def __init__(self, scans: ScansResource) -> None: self._scans = scans + @cached_property + def results(self) -> ResultsResourceWithRawResponse: + return ResultsResourceWithRawResponse(self._scans.results) + @cached_property def config(self) -> ConfigResourceWithRawResponse: return ConfigResourceWithRawResponse(self._scans.config) @@ -79,6 +99,10 @@ class AsyncScansResourceWithRawResponse: def __init__(self, scans: AsyncScansResource) -> None: self._scans = scans + @cached_property + def results(self) -> AsyncResultsResourceWithRawResponse: + return AsyncResultsResourceWithRawResponse(self._scans.results) + @cached_property def config(self) -> AsyncConfigResourceWithRawResponse: return AsyncConfigResourceWithRawResponse(self._scans.config) @@ -88,6 +112,10 @@ class ScansResourceWithStreamingResponse: def __init__(self, scans: ScansResource) -> None: self._scans = scans + @cached_property + def results(self) -> ResultsResourceWithStreamingResponse: + return ResultsResourceWithStreamingResponse(self._scans.results) + @cached_property def config(self) -> ConfigResourceWithStreamingResponse: return ConfigResourceWithStreamingResponse(self._scans.config) @@ -97,6 +125,10 @@ class AsyncScansResourceWithStreamingResponse: def __init__(self, scans: AsyncScansResource) -> None: self._scans = scans + @cached_property + def results(self) -> AsyncResultsResourceWithStreamingResponse: + return AsyncResultsResourceWithStreamingResponse(self._scans.results) + @cached_property def config(self) -> AsyncConfigResourceWithStreamingResponse: return AsyncConfigResourceWithStreamingResponse(self._scans.config) diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py b/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py index 967da4d3341..b25651cac31 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/__init__.py @@ -154,18 +154,18 @@ "AsyncRelateResourceWithRawResponse", "RelateResourceWithStreamingResponse", "AsyncRelateResourceWithStreamingResponse", - "EventTagsResource", - "AsyncEventTagsResource", - "EventTagsResourceWithRawResponse", - "AsyncEventTagsResourceWithRawResponse", - "EventTagsResourceWithStreamingResponse", - "AsyncEventTagsResourceWithStreamingResponse", "TagsResource", "AsyncTagsResource", "TagsResourceWithRawResponse", "AsyncTagsResourceWithRawResponse", "TagsResourceWithStreamingResponse", "AsyncTagsResourceWithStreamingResponse", + "EventTagsResource", + "AsyncEventTagsResource", + "EventTagsResourceWithRawResponse", + "AsyncEventTagsResourceWithRawResponse", + "EventTagsResourceWithStreamingResponse", + "AsyncEventTagsResourceWithStreamingResponse", "TargetIndustriesResource", "AsyncTargetIndustriesResource", "TargetIndustriesResourceWithRawResponse", diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/insights.py b/src/cloudflare/resources/cloudforce_one/threat_events/insights.py index 698b01e01fd..e4178443f05 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/insights.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/insights.py @@ -21,10 +21,10 @@ ) from ...._wrappers import ResultWrapper from ...._base_client import make_request_options -from ....types.cloudforce_one.threat_events import insight_edit_params, insight_creat_params +from ....types.cloudforce_one.threat_events import insight_edit_params, insight_create_params from ....types.cloudforce_one.threat_events.insight_get_response import InsightGetResponse from ....types.cloudforce_one.threat_events.insight_edit_response import InsightEditResponse -from ....types.cloudforce_one.threat_events.insight_creat_response import InsightCreatResponse +from ....types.cloudforce_one.threat_events.insight_create_response import InsightCreateResponse from ....types.cloudforce_one.threat_events.insight_delete_response import InsightDeleteResponse __all__ = ["InsightsResource", "AsyncInsightsResource"] @@ -50,29 +50,27 @@ def with_streaming_response(self) -> InsightsResourceWithStreamingResponse: """ return InsightsResourceWithStreamingResponse(self) - def delete( + def create( self, - insight_id: str, + event_id: str, *, account_id: float, - event_id: str, + content: 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightDeleteResponse: + ) -> InsightCreateResponse: """ - Deletes an event insight + Adds an insight to an event Args: account_id: Account ID event_id: Event UUID - insight_id: Insight UUID - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -83,41 +81,42 @@ def delete( """ if not event_id: raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return self._delete( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", + return self._post( + f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create", + body=maybe_transform({"content": content}, insight_create_params.InsightCreateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper, + post_parser=ResultWrapper[InsightCreateResponse]._unwrapper, ), - cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]), + cast_to=cast(Type[InsightCreateResponse], ResultWrapper[InsightCreateResponse]), ) - def creat( + def delete( self, - event_id: str, + insight_id: str, *, account_id: float, - content: str, + event_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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightCreatResponse: + ) -> InsightDeleteResponse: """ - Adds an insight to an event + Deletes an event insight Args: account_id: Account ID event_id: Event UUID + insight_id: Insight UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -128,17 +127,18 @@ def creat( """ if not event_id: raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - return self._post( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create", - body=maybe_transform({"content": content}, insight_creat_params.InsightCreatParams), + if not insight_id: + raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") + return self._delete( + f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[InsightCreatResponse]._unwrapper, + post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper, ), - cast_to=cast(Type[InsightCreatResponse], ResultWrapper[InsightCreatResponse]), + cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]), ) def edit( @@ -258,29 +258,27 @@ def with_streaming_response(self) -> AsyncInsightsResourceWithStreamingResponse: """ return AsyncInsightsResourceWithStreamingResponse(self) - async def delete( + async def create( self, - insight_id: str, + event_id: str, *, account_id: float, - event_id: str, + content: 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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightDeleteResponse: + ) -> InsightCreateResponse: """ - Deletes an event insight + Adds an insight to an event Args: account_id: Account ID event_id: Event UUID - insight_id: Insight UUID - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -291,41 +289,42 @@ async def delete( """ if not event_id: raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - if not insight_id: - raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") - return await self._delete( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", + return await self._post( + f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create", + body=await async_maybe_transform({"content": content}, insight_create_params.InsightCreateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper, + post_parser=ResultWrapper[InsightCreateResponse]._unwrapper, ), - cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]), + cast_to=cast(Type[InsightCreateResponse], ResultWrapper[InsightCreateResponse]), ) - async def creat( + async def delete( self, - event_id: str, + insight_id: str, *, account_id: float, - content: str, + event_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, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> InsightCreatResponse: + ) -> InsightDeleteResponse: """ - Adds an insight to an event + Deletes an event insight Args: account_id: Account ID event_id: Event UUID + insight_id: Insight UUID + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -336,17 +335,18 @@ async def creat( """ if not event_id: raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") - return await self._post( - f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/create", - body=await async_maybe_transform({"content": content}, insight_creat_params.InsightCreatParams), + if not insight_id: + raise ValueError(f"Expected a non-empty value for `insight_id` but received {insight_id!r}") + return await self._delete( + f"/accounts/{account_id}/cloudforce-one/events/{event_id}/insight/{insight_id}", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - post_parser=ResultWrapper[InsightCreatResponse]._unwrapper, + post_parser=ResultWrapper[InsightDeleteResponse]._unwrapper, ), - cast_to=cast(Type[InsightCreatResponse], ResultWrapper[InsightCreatResponse]), + cast_to=cast(Type[InsightDeleteResponse], ResultWrapper[InsightDeleteResponse]), ) async def edit( @@ -450,12 +450,12 @@ class InsightsResourceWithRawResponse: def __init__(self, insights: InsightsResource) -> None: self._insights = insights + self.create = to_raw_response_wrapper( + insights.create, + ) self.delete = to_raw_response_wrapper( insights.delete, ) - self.creat = to_raw_response_wrapper( - insights.creat, - ) self.edit = to_raw_response_wrapper( insights.edit, ) @@ -468,12 +468,12 @@ class AsyncInsightsResourceWithRawResponse: def __init__(self, insights: AsyncInsightsResource) -> None: self._insights = insights + self.create = async_to_raw_response_wrapper( + insights.create, + ) self.delete = async_to_raw_response_wrapper( insights.delete, ) - self.creat = async_to_raw_response_wrapper( - insights.creat, - ) self.edit = async_to_raw_response_wrapper( insights.edit, ) @@ -486,12 +486,12 @@ class InsightsResourceWithStreamingResponse: def __init__(self, insights: InsightsResource) -> None: self._insights = insights + self.create = to_streamed_response_wrapper( + insights.create, + ) self.delete = to_streamed_response_wrapper( insights.delete, ) - self.creat = to_streamed_response_wrapper( - insights.creat, - ) self.edit = to_streamed_response_wrapper( insights.edit, ) @@ -504,12 +504,12 @@ class AsyncInsightsResourceWithStreamingResponse: def __init__(self, insights: AsyncInsightsResource) -> None: self._insights = insights + self.create = async_to_streamed_response_wrapper( + insights.create, + ) self.delete = async_to_streamed_response_wrapper( insights.delete, ) - self.creat = async_to_streamed_response_wrapper( - insights.creat, - ) self.edit = async_to_streamed_response_wrapper( insights.edit, ) diff --git a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py index 2c56001cc33..c6d71c53ee9 100644 --- a/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py +++ b/src/cloudflare/resources/cloudforce_one/threat_events/threat_events.py @@ -164,14 +164,14 @@ def raw(self) -> RawResource: def relate(self) -> RelateResource: return RelateResource(self._client) - @cached_property - def event_tags(self) -> EventTagsResource: - return EventTagsResource(self._client) - @cached_property def tags(self) -> TagsResource: return TagsResource(self._client) + @cached_property + def event_tags(self) -> EventTagsResource: + return EventTagsResource(self._client) + @cached_property def target_industries(self) -> TargetIndustriesResource: return TargetIndustriesResource(self._client) @@ -480,14 +480,14 @@ def raw(self) -> AsyncRawResource: def relate(self) -> AsyncRelateResource: return AsyncRelateResource(self._client) - @cached_property - def event_tags(self) -> AsyncEventTagsResource: - return AsyncEventTagsResource(self._client) - @cached_property def tags(self) -> AsyncTagsResource: return AsyncTagsResource(self._client) + @cached_property + def event_tags(self) -> AsyncEventTagsResource: + return AsyncEventTagsResource(self._client) + @cached_property def target_industries(self) -> AsyncTargetIndustriesResource: return AsyncTargetIndustriesResource(self._client) @@ -815,14 +815,14 @@ def raw(self) -> RawResourceWithRawResponse: def relate(self) -> RelateResourceWithRawResponse: return RelateResourceWithRawResponse(self._threat_events.relate) - @cached_property - def event_tags(self) -> EventTagsResourceWithRawResponse: - return EventTagsResourceWithRawResponse(self._threat_events.event_tags) - @cached_property def tags(self) -> TagsResourceWithRawResponse: return TagsResourceWithRawResponse(self._threat_events.tags) + @cached_property + def event_tags(self) -> EventTagsResourceWithRawResponse: + return EventTagsResourceWithRawResponse(self._threat_events.event_tags) + @cached_property def target_industries(self) -> TargetIndustriesResourceWithRawResponse: return TargetIndustriesResourceWithRawResponse(self._threat_events.target_industries) @@ -884,14 +884,14 @@ def raw(self) -> AsyncRawResourceWithRawResponse: def relate(self) -> AsyncRelateResourceWithRawResponse: return AsyncRelateResourceWithRawResponse(self._threat_events.relate) - @cached_property - def event_tags(self) -> AsyncEventTagsResourceWithRawResponse: - return AsyncEventTagsResourceWithRawResponse(self._threat_events.event_tags) - @cached_property def tags(self) -> AsyncTagsResourceWithRawResponse: return AsyncTagsResourceWithRawResponse(self._threat_events.tags) + @cached_property + def event_tags(self) -> AsyncEventTagsResourceWithRawResponse: + return AsyncEventTagsResourceWithRawResponse(self._threat_events.event_tags) + @cached_property def target_industries(self) -> AsyncTargetIndustriesResourceWithRawResponse: return AsyncTargetIndustriesResourceWithRawResponse(self._threat_events.target_industries) @@ -953,14 +953,14 @@ def raw(self) -> RawResourceWithStreamingResponse: def relate(self) -> RelateResourceWithStreamingResponse: return RelateResourceWithStreamingResponse(self._threat_events.relate) - @cached_property - def event_tags(self) -> EventTagsResourceWithStreamingResponse: - return EventTagsResourceWithStreamingResponse(self._threat_events.event_tags) - @cached_property def tags(self) -> TagsResourceWithStreamingResponse: return TagsResourceWithStreamingResponse(self._threat_events.tags) + @cached_property + def event_tags(self) -> EventTagsResourceWithStreamingResponse: + return EventTagsResourceWithStreamingResponse(self._threat_events.event_tags) + @cached_property def target_industries(self) -> TargetIndustriesResourceWithStreamingResponse: return TargetIndustriesResourceWithStreamingResponse(self._threat_events.target_industries) @@ -1022,14 +1022,14 @@ def raw(self) -> AsyncRawResourceWithStreamingResponse: def relate(self) -> AsyncRelateResourceWithStreamingResponse: return AsyncRelateResourceWithStreamingResponse(self._threat_events.relate) - @cached_property - def event_tags(self) -> AsyncEventTagsResourceWithStreamingResponse: - return AsyncEventTagsResourceWithStreamingResponse(self._threat_events.event_tags) - @cached_property def tags(self) -> AsyncTagsResourceWithStreamingResponse: return AsyncTagsResourceWithStreamingResponse(self._threat_events.tags) + @cached_property + def event_tags(self) -> AsyncEventTagsResourceWithStreamingResponse: + return AsyncEventTagsResourceWithStreamingResponse(self._threat_events.event_tags) + @cached_property def target_industries(self) -> AsyncTargetIndustriesResourceWithStreamingResponse: return AsyncTargetIndustriesResourceWithStreamingResponse(self._threat_events.target_industries) diff --git a/src/cloudflare/resources/origin_ca_certificates.py b/src/cloudflare/resources/origin_ca_certificates.py index c5362e9fc68..c87fe013c3a 100644 --- a/src/cloudflare/resources/origin_ca_certificates.py +++ b/src/cloudflare/resources/origin_ca_certificates.py @@ -114,7 +114,7 @@ def create( def list( self, *, - zone_id: str | NotGiven = NOT_GIVEN, + zone_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, @@ -323,7 +323,7 @@ async def create( def list( self, *, - zone_id: str | NotGiven = NOT_GIVEN, + zone_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, diff --git a/src/cloudflare/types/cloudforce_one/scans/__init__.py b/src/cloudflare/types/cloudforce_one/scans/__init__.py index ba3880b957a..20eebc53db3 100644 --- a/src/cloudflare/types/cloudforce_one/scans/__init__.py +++ b/src/cloudflare/types/cloudforce_one/scans/__init__.py @@ -2,6 +2,10 @@ from __future__ import annotations +from .scan_result import ScanResult as ScanResult +from .config_edit_params import ConfigEditParams as ConfigEditParams +from .result_get_response import ResultGetResponse as ResultGetResponse from .config_create_params import ConfigCreateParams as ConfigCreateParams +from .config_edit_response import ConfigEditResponse as ConfigEditResponse from .config_list_response import ConfigListResponse as ConfigListResponse from .config_create_response import ConfigCreateResponse as ConfigCreateResponse diff --git a/src/cloudflare/types/cloudforce_one/scans/config_create_response.py b/src/cloudflare/types/cloudforce_one/scans/config_create_response.py index 8947b61c230..9cda17d40bb 100644 --- a/src/cloudflare/types/cloudforce_one/scans/config_create_response.py +++ b/src/cloudflare/types/cloudforce_one/scans/config_create_response.py @@ -9,11 +9,23 @@ class ConfigCreateResponse(BaseModel): id: str + """Config ID""" account_id: str frequency: float + """The number of days between each scan (0 = no recurring scans).""" ips: List[str] + """A list of IP addresses or CIDR blocks to scan. + + The maximum number of total IP addresses allowed is 5000. + """ ports: List[str] + """A list of ports to scan. + + Allowed values:"default", "all", or a comma-separated list of ports or range of + ports (e.g. ["1-80", "443"]). Default will scan the 100 most commonly open + ports. + """ diff --git a/src/cloudflare/types/cloudforce_one/scans/config_edit_params.py b/src/cloudflare/types/cloudforce_one/scans/config_edit_params.py new file mode 100644 index 00000000000..266e3a678f8 --- /dev/null +++ b/src/cloudflare/types/cloudforce_one/scans/config_edit_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Required, TypedDict + +__all__ = ["ConfigEditParams"] + + +class ConfigEditParams(TypedDict, total=False): + account_id: Required[str] + """Account ID""" + + frequency: float + """The number of days between each scan (0 = no recurring scans).""" + + ips: List[str] + """A list of IP addresses or CIDR blocks to scan. + + The maximum number of total IP addresses allowed is 5000. + """ + + ports: List[str] + """A list of ports to scan. + + Allowed values:"default", "all", or a comma-separated list of ports or range of + ports (e.g. ["1-80", "443"]). Default will scan the 100 most commonly open + ports. + """ diff --git a/src/cloudflare/types/cloudforce_one/scans/config_edit_response.py b/src/cloudflare/types/cloudforce_one/scans/config_edit_response.py new file mode 100644 index 00000000000..2b991d042a4 --- /dev/null +++ b/src/cloudflare/types/cloudforce_one/scans/config_edit_response.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from ...._models import BaseModel + +__all__ = ["ConfigEditResponse"] + + +class ConfigEditResponse(BaseModel): + id: str + """Config ID""" + + account_id: str + + frequency: float + """The number of days between each scan (0 = no recurring scans).""" + + ips: List[str] + """A list of IP addresses or CIDR blocks to scan. + + The maximum number of total IP addresses allowed is 5000. + """ + + ports: List[str] + """A list of ports to scan. + + Allowed values:"default", "all", or a comma-separated list of ports or range of + ports (e.g. ["1-80", "443"]). Default will scan the 100 most commonly open + ports. + """ diff --git a/src/cloudflare/types/cloudforce_one/scans/config_list_response.py b/src/cloudflare/types/cloudforce_one/scans/config_list_response.py index 962a1b4fa6e..df45badd6ff 100644 --- a/src/cloudflare/types/cloudforce_one/scans/config_list_response.py +++ b/src/cloudflare/types/cloudforce_one/scans/config_list_response.py @@ -9,11 +9,23 @@ class ConfigListResponse(BaseModel): id: str + """Config ID""" account_id: str frequency: float + """The number of days between each scan (0 = no recurring scans).""" ips: List[str] + """A list of IP addresses or CIDR blocks to scan. + + The maximum number of total IP addresses allowed is 5000. + """ ports: List[str] + """A list of ports to scan. + + Allowed values:"default", "all", or a comma-separated list of ports or range of + ports (e.g. ["1-80", "443"]). Default will scan the 100 most commonly open + ports. + """ diff --git a/src/cloudflare/types/cloudforce_one/scans/result_get_response.py b/src/cloudflare/types/cloudforce_one/scans/result_get_response.py new file mode 100644 index 00000000000..a0c5eefe69b --- /dev/null +++ b/src/cloudflare/types/cloudforce_one/scans/result_get_response.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from pydantic import Field as FieldInfo + +from ...._models import BaseModel +from .scan_result import ScanResult + +__all__ = ["ResultGetResponse"] + + +class ResultGetResponse(BaseModel): + one_one_one_one: List[ScanResult] = FieldInfo(alias="1.1.1.1") diff --git a/src/cloudflare/types/cloudforce_one/scans/scan_result.py b/src/cloudflare/types/cloudforce_one/scans/scan_result.py new file mode 100644 index 00000000000..595fb25c350 --- /dev/null +++ b/src/cloudflare/types/cloudforce_one/scans/scan_result.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ...._models import BaseModel + +__all__ = ["ScanResult"] + + +class ScanResult(BaseModel): + number: Optional[float] = None + + proto: Optional[str] = None + + status: Optional[str] = None diff --git a/src/cloudflare/types/cloudforce_one/threat_events/__init__.py b/src/cloudflare/types/cloudforce_one/threat_events/__init__.py index b769b52fd39..f4e3339f8d7 100644 --- a/src/cloudflare/types/cloudforce_one/threat_events/__init__.py +++ b/src/cloudflare/types/cloudforce_one/threat_events/__init__.py @@ -14,22 +14,22 @@ from .category_edit_params import CategoryEditParams as CategoryEditParams from .dataset_get_response import DatasetGetResponse as DatasetGetResponse from .dataset_raw_response import DatasetRawResponse as DatasetRawResponse -from .insight_creat_params import InsightCreatParams as InsightCreatParams from .insight_get_response import InsightGetResponse as InsightGetResponse from .category_get_response import CategoryGetResponse as CategoryGetResponse from .country_list_response import CountryListResponse as CountryListResponse from .dataset_create_params import DatasetCreateParams as DatasetCreateParams from .dataset_edit_response import DatasetEditResponse as DatasetEditResponse from .dataset_list_response import DatasetListResponse as DatasetListResponse +from .insight_create_params import InsightCreateParams as InsightCreateParams from .insight_edit_response import InsightEditResponse as InsightEditResponse from .attacker_list_response import AttackerListResponse as AttackerListResponse from .category_create_params import CategoryCreateParams as CategoryCreateParams from .category_edit_response import CategoryEditResponse as CategoryEditResponse from .category_list_response import CategoryListResponse as CategoryListResponse -from .insight_creat_response import InsightCreatResponse as InsightCreatResponse from .relate_delete_response import RelateDeleteResponse as RelateDeleteResponse from .dataset_create_response import DatasetCreateResponse as DatasetCreateResponse from .event_tag_create_params import EventTagCreateParams as EventTagCreateParams +from .insight_create_response import InsightCreateResponse as InsightCreateResponse from .insight_delete_response import InsightDeleteResponse as InsightDeleteResponse from .category_create_response import CategoryCreateResponse as CategoryCreateResponse from .category_delete_response import CategoryDeleteResponse as CategoryDeleteResponse diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_creat_params.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py similarity index 75% rename from src/cloudflare/types/cloudforce_one/threat_events/insight_creat_params.py rename to src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py index ca6cbf7dbbd..a85b6072bb8 100644 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_creat_params.py +++ b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["InsightCreatParams"] +__all__ = ["InsightCreateParams"] -class InsightCreatParams(TypedDict, total=False): +class InsightCreateParams(TypedDict, total=False): account_id: Required[float] """Account ID""" diff --git a/src/cloudflare/types/cloudforce_one/threat_events/insight_creat_response.py b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py similarity index 67% rename from src/cloudflare/types/cloudforce_one/threat_events/insight_creat_response.py rename to src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py index d86488ce100..dc24961b6ee 100644 --- a/src/cloudflare/types/cloudforce_one/threat_events/insight_creat_response.py +++ b/src/cloudflare/types/cloudforce_one/threat_events/insight_create_response.py @@ -3,10 +3,10 @@ from ...._models import BaseModel -__all__ = ["InsightCreatResponse"] +__all__ = ["InsightCreateResponse"] -class InsightCreatResponse(BaseModel): +class InsightCreateResponse(BaseModel): content: str uuid: str diff --git a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py index e4f64955822..f818e97fe9d 100644 --- a/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py +++ b/src/cloudflare/types/origin_ca_certificates/origin_ca_certificate_list_params.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict __all__ = ["OriginCACertificateListParams"] class OriginCACertificateListParams(TypedDict, total=False): - zone_id: str + zone_id: Required[str] """Identifier""" diff --git a/tests/api_resources/cloudforce_one/scans/test_config.py b/tests/api_resources/cloudforce_one/scans/test_config.py index a67e32a882b..532ae366d26 100644 --- a/tests/api_resources/cloudforce_one/scans/test_config.py +++ b/tests/api_resources/cloudforce_one/scans/test_config.py @@ -10,7 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncSinglePage, AsyncSinglePage -from cloudflare.types.cloudforce_one.scans import ConfigListResponse, ConfigCreateResponse +from cloudflare.types.cloudforce_one.scans import ( + ConfigEditResponse, + ConfigListResponse, + ConfigCreateResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +26,7 @@ class TestConfig: def test_method_create(self, client: Cloudflare) -> None: config = client.cloudforce_one.scans.config.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) @@ -30,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: def test_method_create_with_all_params(self, client: Cloudflare) -> None: config = client.cloudforce_one.scans.config.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], frequency=7, ports=["default"], ) @@ -40,7 +44,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.scans.config.with_raw_response.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) assert response.is_closed is True @@ -52,7 +56,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.scans.config.with_streaming_response.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +71,7 @@ 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.cloudforce_one.scans.config.with_raw_response.create( account_id="", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) @parametrize @@ -108,6 +112,113 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="", ) + @parametrize + def test_method_delete(self, client: Cloudflare) -> None: + config = client.cloudforce_one.scans.config.delete( + config_id="config_id", + account_id="account_id", + ) + assert_matches_type(object, config, path=["response"]) + + @parametrize + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.cloudforce_one.scans.config.with_raw_response.delete( + config_id="config_id", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + config = response.parse() + assert_matches_type(object, config, path=["response"]) + + @parametrize + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.cloudforce_one.scans.config.with_streaming_response.delete( + config_id="config_id", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + config = response.parse() + assert_matches_type(object, config, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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.cloudforce_one.scans.config.with_raw_response.delete( + config_id="config_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `config_id` but received ''"): + client.cloudforce_one.scans.config.with_raw_response.delete( + config_id="", + account_id="account_id", + ) + + @parametrize + def test_method_edit(self, client: Cloudflare) -> None: + config = client.cloudforce_one.scans.config.edit( + config_id="config_id", + account_id="account_id", + ) + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + @parametrize + def test_method_edit_with_all_params(self, client: Cloudflare) -> None: + config = client.cloudforce_one.scans.config.edit( + config_id="config_id", + account_id="account_id", + frequency=7, + ips=["1.1.1.1", "2606:4700:4700::1111"], + ports=["default"], + ) + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + @parametrize + def test_raw_response_edit(self, client: Cloudflare) -> None: + response = client.cloudforce_one.scans.config.with_raw_response.edit( + config_id="config_id", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + config = response.parse() + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + @parametrize + def test_streaming_response_edit(self, client: Cloudflare) -> None: + with client.cloudforce_one.scans.config.with_streaming_response.edit( + config_id="config_id", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + config = response.parse() + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_edit(self, client: Cloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + client.cloudforce_one.scans.config.with_raw_response.edit( + config_id="config_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `config_id` but received ''"): + client.cloudforce_one.scans.config.with_raw_response.edit( + config_id="", + account_id="account_id", + ) + class TestAsyncConfig: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -116,7 +227,7 @@ class TestAsyncConfig: async def test_method_create(self, async_client: AsyncCloudflare) -> None: config = await async_client.cloudforce_one.scans.config.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) assert_matches_type(Optional[ConfigCreateResponse], config, path=["response"]) @@ -124,7 +235,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: config = await async_client.cloudforce_one.scans.config.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], frequency=7, ports=["default"], ) @@ -134,7 +245,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.scans.config.with_raw_response.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) assert response.is_closed is True @@ -146,7 +257,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.scans.config.with_streaming_response.create( account_id="account_id", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,7 +272,7 @@ 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.cloudforce_one.scans.config.with_raw_response.create( account_id="", - ips=["1.1.1.1"], + ips=["1.1.1.1", "2606:4700:4700::1111"], ) @parametrize @@ -201,3 +312,110 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: await async_client.cloudforce_one.scans.config.with_raw_response.list( account_id="", ) + + @parametrize + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + config = await async_client.cloudforce_one.scans.config.delete( + config_id="config_id", + account_id="account_id", + ) + assert_matches_type(object, config, path=["response"]) + + @parametrize + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloudforce_one.scans.config.with_raw_response.delete( + config_id="config_id", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + config = await response.parse() + assert_matches_type(object, config, path=["response"]) + + @parametrize + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloudforce_one.scans.config.with_streaming_response.delete( + config_id="config_id", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + config = await response.parse() + assert_matches_type(object, config, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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.cloudforce_one.scans.config.with_raw_response.delete( + config_id="config_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `config_id` but received ''"): + await async_client.cloudforce_one.scans.config.with_raw_response.delete( + config_id="", + account_id="account_id", + ) + + @parametrize + async def test_method_edit(self, async_client: AsyncCloudflare) -> None: + config = await async_client.cloudforce_one.scans.config.edit( + config_id="config_id", + account_id="account_id", + ) + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + @parametrize + async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: + config = await async_client.cloudforce_one.scans.config.edit( + config_id="config_id", + account_id="account_id", + frequency=7, + ips=["1.1.1.1", "2606:4700:4700::1111"], + ports=["default"], + ) + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + @parametrize + async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloudforce_one.scans.config.with_raw_response.edit( + config_id="config_id", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + config = await response.parse() + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + @parametrize + async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloudforce_one.scans.config.with_streaming_response.edit( + config_id="config_id", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + config = await response.parse() + assert_matches_type(Optional[ConfigEditResponse], config, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): + await async_client.cloudforce_one.scans.config.with_raw_response.edit( + config_id="config_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `config_id` but received ''"): + await async_client.cloudforce_one.scans.config.with_raw_response.edit( + config_id="", + account_id="account_id", + ) diff --git a/tests/api_resources/cloudforce_one/scans/test_results.py b/tests/api_resources/cloudforce_one/scans/test_results.py new file mode 100644 index 00000000000..0ac885288f3 --- /dev/null +++ b/tests/api_resources/cloudforce_one/scans/test_results.py @@ -0,0 +1,118 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from cloudflare import Cloudflare, AsyncCloudflare +from tests.utils import assert_matches_type +from cloudflare.types.cloudforce_one.scans import ResultGetResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestResults: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_get(self, client: Cloudflare) -> None: + result = client.cloudforce_one.scans.results.get( + config_id="config_id", + account_id="account_id", + ) + assert_matches_type(ResultGetResponse, result, path=["response"]) + + @parametrize + def test_raw_response_get(self, client: Cloudflare) -> None: + response = client.cloudforce_one.scans.results.with_raw_response.get( + config_id="config_id", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + result = response.parse() + assert_matches_type(ResultGetResponse, result, path=["response"]) + + @parametrize + def test_streaming_response_get(self, client: Cloudflare) -> None: + with client.cloudforce_one.scans.results.with_streaming_response.get( + config_id="config_id", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + result = response.parse() + assert_matches_type(ResultGetResponse, result, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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.cloudforce_one.scans.results.with_raw_response.get( + config_id="config_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `config_id` but received ''"): + client.cloudforce_one.scans.results.with_raw_response.get( + config_id="", + account_id="account_id", + ) + + +class TestAsyncResults: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_get(self, async_client: AsyncCloudflare) -> None: + result = await async_client.cloudforce_one.scans.results.get( + config_id="config_id", + account_id="account_id", + ) + assert_matches_type(ResultGetResponse, result, path=["response"]) + + @parametrize + async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloudforce_one.scans.results.with_raw_response.get( + config_id="config_id", + account_id="account_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + result = await response.parse() + assert_matches_type(ResultGetResponse, result, path=["response"]) + + @parametrize + async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloudforce_one.scans.results.with_streaming_response.get( + config_id="config_id", + account_id="account_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + result = await response.parse() + assert_matches_type(ResultGetResponse, result, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @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.cloudforce_one.scans.results.with_raw_response.get( + config_id="config_id", + account_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `config_id` but received ''"): + await async_client.cloudforce_one.scans.results.with_raw_response.get( + config_id="", + account_id="account_id", + ) diff --git a/tests/api_resources/cloudforce_one/test_threat_events.py b/tests/api_resources/cloudforce_one/test_threat_events.py index 5f8727ba35b..2edd4332543 100644 --- a/tests/api_resources/cloudforce_one/test_threat_events.py +++ b/tests/api_resources/cloudforce_one/test_threat_events.py @@ -24,6 +24,7 @@ class TestThreatEvents: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.create( @@ -39,6 +40,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.create( @@ -64,6 +66,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.create( @@ -83,6 +86,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: threat_event = response.parse() assert_matches_type(ThreatEventCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.create( @@ -104,6 +108,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_delete(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.delete( @@ -112,6 +117,7 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventDeleteResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.delete( @@ -124,6 +130,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: threat_event = response.parse() assert_matches_type(ThreatEventDeleteResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.delete( @@ -138,6 +145,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -146,6 +154,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_bulk_create(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.bulk_create( @@ -166,6 +175,7 @@ def test_method_bulk_create(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventBulkCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_bulk_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.bulk_create( @@ -190,6 +200,7 @@ def test_raw_response_bulk_create(self, client: Cloudflare) -> None: threat_event = response.parse() assert_matches_type(ThreatEventBulkCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_bulk_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.bulk_create( @@ -216,6 +227,7 @@ def test_streaming_response_bulk_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.edit( @@ -224,6 +236,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventEditResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.edit( @@ -242,6 +255,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventEditResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.edit( @@ -254,6 +268,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: threat_event = response.parse() assert_matches_type(ThreatEventEditResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.edit( @@ -268,6 +283,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -276,6 +292,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: threat_event = client.cloudforce_one.threat_events.get( @@ -284,6 +301,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.with_raw_response.get( @@ -296,6 +314,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: threat_event = response.parse() assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.with_streaming_response.get( @@ -310,6 +329,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -322,6 +342,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncThreatEvents: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.create( @@ -337,6 +358,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ThreatEventCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.create( @@ -362,6 +384,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(ThreatEventCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.with_raw_response.create( @@ -381,6 +404,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: threat_event = await response.parse() assert_matches_type(ThreatEventCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.with_streaming_response.create( @@ -402,6 +426,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.delete( @@ -410,6 +435,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ThreatEventDeleteResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.with_raw_response.delete( @@ -422,6 +448,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: threat_event = await response.parse() assert_matches_type(ThreatEventDeleteResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.with_streaming_response.delete( @@ -436,6 +463,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -444,6 +472,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_bulk_create(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.bulk_create( @@ -464,6 +493,7 @@ async def test_method_bulk_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ThreatEventBulkCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_bulk_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.with_raw_response.bulk_create( @@ -488,6 +518,7 @@ async def test_raw_response_bulk_create(self, async_client: AsyncCloudflare) -> threat_event = await response.parse() assert_matches_type(ThreatEventBulkCreateResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_bulk_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.with_streaming_response.bulk_create( @@ -514,6 +545,7 @@ async def test_streaming_response_bulk_create(self, async_client: AsyncCloudflar assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.edit( @@ -522,6 +554,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ThreatEventEditResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.edit( @@ -540,6 +573,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(ThreatEventEditResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.with_raw_response.edit( @@ -552,6 +586,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: threat_event = await response.parse() assert_matches_type(ThreatEventEditResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.with_streaming_response.edit( @@ -566,6 +601,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -574,6 +610,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: threat_event = await async_client.cloudforce_one.threat_events.get( @@ -582,6 +619,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.with_raw_response.get( @@ -594,6 +632,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: threat_event = await response.parse() assert_matches_type(ThreatEventGetResponse, threat_event, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.with_streaming_response.get( @@ -608,6 +647,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py index 464eadb0702..cbd2c16ac29 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_attackers.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_attackers.py @@ -17,6 +17,7 @@ class TestAttackers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: attacker = client.cloudforce_one.threat_events.attackers.list( @@ -24,6 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(AttackerListResponse, attacker, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.attackers.with_raw_response.list( @@ -35,6 +37,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: attacker = response.parse() assert_matches_type(AttackerListResponse, attacker, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.attackers.with_streaming_response.list( @@ -52,6 +55,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncAttackers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: attacker = await async_client.cloudforce_one.threat_events.attackers.list( @@ -59,6 +63,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AttackerListResponse, attacker, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.attackers.with_raw_response.list( @@ -70,6 +75,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: attacker = await response.parse() assert_matches_type(AttackerListResponse, attacker, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.attackers.with_streaming_response.list( diff --git a/tests/api_resources/cloudforce_one/threat_events/test_categories.py b/tests/api_resources/cloudforce_one/threat_events/test_categories.py index 20ded66d937..b1f8500a700 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_categories.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_categories.py @@ -23,6 +23,7 @@ class TestCategories: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.create( @@ -32,6 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryCreateResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create_with_all_params(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.create( @@ -43,6 +45,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryCreateResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.categories.with_raw_response.create( @@ -56,6 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: category = response.parse() assert_matches_type(CategoryCreateResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.categories.with_streaming_response.create( @@ -71,6 +75,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.list( @@ -78,6 +83,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryListResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.categories.with_raw_response.list( @@ -89,6 +95,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: category = response.parse() assert_matches_type(CategoryListResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.categories.with_streaming_response.list( @@ -102,6 +109,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_delete(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.delete( @@ -110,6 +118,7 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryDeleteResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.categories.with_raw_response.delete( @@ -122,6 +131,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: category = response.parse() assert_matches_type(CategoryDeleteResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.categories.with_streaming_response.delete( @@ -136,6 +146,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `category_id` but received ''"): @@ -144,6 +155,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.edit( @@ -152,6 +164,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryEditResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.edit( @@ -164,6 +177,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryEditResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.categories.with_raw_response.edit( @@ -176,6 +190,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: category = response.parse() assert_matches_type(CategoryEditResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.categories.with_streaming_response.edit( @@ -190,6 +205,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `category_id` but received ''"): @@ -198,6 +214,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: category = client.cloudforce_one.threat_events.categories.get( @@ -206,6 +223,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(CategoryGetResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.categories.with_raw_response.get( @@ -218,6 +236,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: category = response.parse() assert_matches_type(CategoryGetResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.categories.with_streaming_response.get( @@ -232,6 +251,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `category_id` but received ''"): @@ -244,6 +264,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCategories: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.create( @@ -253,6 +274,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CategoryCreateResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.create( @@ -264,6 +286,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(CategoryCreateResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.create( @@ -277,6 +300,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: category = await response.parse() assert_matches_type(CategoryCreateResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.create( @@ -292,6 +316,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.list( @@ -299,6 +324,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CategoryListResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.list( @@ -310,6 +336,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: category = await response.parse() assert_matches_type(CategoryListResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.list( @@ -323,6 +350,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.delete( @@ -331,6 +359,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CategoryDeleteResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.delete( @@ -343,6 +372,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: category = await response.parse() assert_matches_type(CategoryDeleteResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.delete( @@ -357,6 +387,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `category_id` but received ''"): @@ -365,6 +396,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.edit( @@ -373,6 +405,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CategoryEditResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.edit( @@ -385,6 +418,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(CategoryEditResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.edit( @@ -397,6 +431,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: category = await response.parse() assert_matches_type(CategoryEditResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.edit( @@ -411,6 +446,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `category_id` but received ''"): @@ -419,6 +455,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: category = await async_client.cloudforce_one.threat_events.categories.get( @@ -427,6 +464,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CategoryGetResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.categories.with_raw_response.get( @@ -439,6 +477,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: category = await response.parse() assert_matches_type(CategoryGetResponse, category, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.categories.with_streaming_response.get( @@ -453,6 +492,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `category_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_countries.py b/tests/api_resources/cloudforce_one/threat_events/test_countries.py index 21666a6a9bc..bad4cd2c4a0 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_countries.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_countries.py @@ -17,6 +17,7 @@ class TestCountries: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: country = client.cloudforce_one.threat_events.countries.list( @@ -24,6 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(CountryListResponse, country, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.countries.with_raw_response.list( @@ -35,6 +37,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: country = response.parse() assert_matches_type(CountryListResponse, country, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.countries.with_streaming_response.list( @@ -52,6 +55,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncCountries: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: country = await async_client.cloudforce_one.threat_events.countries.list( @@ -59,6 +63,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CountryListResponse, country, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.countries.with_raw_response.list( @@ -70,6 +75,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: country = await response.parse() assert_matches_type(CountryListResponse, country, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.countries.with_streaming_response.list( diff --git a/tests/api_resources/cloudforce_one/threat_events/test_crons.py b/tests/api_resources/cloudforce_one/threat_events/test_crons.py index 54137f33496..c64e9104a08 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_crons.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_crons.py @@ -17,6 +17,7 @@ class TestCrons: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: cron = client.cloudforce_one.threat_events.crons.list( @@ -24,6 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(CronListResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.crons.with_raw_response.list( @@ -35,6 +37,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: cron = response.parse() assert_matches_type(CronListResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.crons.with_streaming_response.list( @@ -48,6 +51,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit(self, client: Cloudflare) -> None: cron = client.cloudforce_one.threat_events.crons.edit( @@ -55,6 +59,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(CronEditResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.crons.with_raw_response.edit( @@ -66,6 +71,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: cron = response.parse() assert_matches_type(CronEditResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.crons.with_streaming_response.edit( @@ -83,6 +89,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: class TestAsyncCrons: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: cron = await async_client.cloudforce_one.threat_events.crons.list( @@ -90,6 +97,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CronListResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.crons.with_raw_response.list( @@ -101,6 +109,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: cron = await response.parse() assert_matches_type(CronListResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.crons.with_streaming_response.list( @@ -114,6 +123,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: cron = await async_client.cloudforce_one.threat_events.crons.edit( @@ -121,6 +131,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(CronEditResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.crons.with_raw_response.edit( @@ -132,6 +143,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: cron = await response.parse() assert_matches_type(CronEditResponse, cron, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.crons.with_streaming_response.edit( diff --git a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py index 3766339f69e..42aa9ae3127 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_datasets.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_datasets.py @@ -23,6 +23,7 @@ class TestDatasets: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create(self, client: Cloudflare) -> None: dataset = client.cloudforce_one.threat_events.datasets.create( @@ -32,6 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetCreateResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.datasets.with_raw_response.create( @@ -45,6 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetCreateResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.datasets.with_streaming_response.create( @@ -60,6 +63,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: dataset = client.cloudforce_one.threat_events.datasets.list( @@ -67,6 +71,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetListResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.datasets.with_raw_response.list( @@ -78,6 +83,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetListResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.datasets.with_streaming_response.list( @@ -91,6 +97,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit(self, client: Cloudflare) -> None: dataset = client.cloudforce_one.threat_events.datasets.edit( @@ -101,6 +108,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetEditResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.datasets.with_raw_response.edit( @@ -115,6 +123,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetEditResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.datasets.with_streaming_response.edit( @@ -131,6 +140,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -141,6 +151,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: name="x", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: dataset = client.cloudforce_one.threat_events.datasets.get( @@ -149,6 +160,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetGetResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.datasets.with_raw_response.get( @@ -161,6 +173,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetGetResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.datasets.with_streaming_response.get( @@ -175,6 +188,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -183,6 +197,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_raw(self, client: Cloudflare) -> None: dataset = client.cloudforce_one.threat_events.datasets.raw( @@ -192,6 +207,7 @@ def test_method_raw(self, client: Cloudflare) -> None: ) assert_matches_type(DatasetRawResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_raw(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.datasets.with_raw_response.raw( @@ -205,6 +221,7 @@ def test_raw_response_raw(self, client: Cloudflare) -> None: dataset = response.parse() assert_matches_type(DatasetRawResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_raw(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.datasets.with_streaming_response.raw( @@ -220,6 +237,7 @@ def test_streaming_response_raw(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_raw(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -240,6 +258,7 @@ def test_path_params_raw(self, client: Cloudflare) -> None: class TestAsyncDatasets: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.cloudforce_one.threat_events.datasets.create( @@ -249,6 +268,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatasetCreateResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.create( @@ -262,6 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(DatasetCreateResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.create( @@ -277,6 +298,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.cloudforce_one.threat_events.datasets.list( @@ -284,6 +306,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatasetListResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.list( @@ -295,6 +318,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(DatasetListResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.list( @@ -308,6 +332,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.cloudforce_one.threat_events.datasets.edit( @@ -318,6 +343,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatasetEditResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.edit( @@ -332,6 +358,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(DatasetEditResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.edit( @@ -348,6 +375,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -358,6 +386,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: name="x", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.cloudforce_one.threat_events.datasets.get( @@ -366,6 +395,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatasetGetResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.get( @@ -378,6 +408,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(DatasetGetResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.get( @@ -392,6 +423,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): @@ -400,6 +432,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: account_id=0, ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_raw(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.cloudforce_one.threat_events.datasets.raw( @@ -409,6 +442,7 @@ async def test_method_raw(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DatasetRawResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_raw(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.datasets.with_raw_response.raw( @@ -422,6 +456,7 @@ async def test_raw_response_raw(self, async_client: AsyncCloudflare) -> None: dataset = await response.parse() assert_matches_type(DatasetRawResponse, dataset, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_raw(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.datasets.with_streaming_response.raw( @@ -437,6 +472,7 @@ async def test_streaming_response_raw(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_raw(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py index 3c59ebc9cb0..57058e0d73e 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_event_tags.py @@ -20,6 +20,7 @@ class TestEventTags: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create(self, client: Cloudflare) -> None: event_tag = client.cloudforce_one.threat_events.event_tags.create( @@ -29,6 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(EventTagCreateResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.event_tags.with_raw_response.create( @@ -42,6 +44,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: event_tag = response.parse() assert_matches_type(EventTagCreateResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.event_tags.with_streaming_response.create( @@ -57,6 +60,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -66,6 +70,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: tags=["botnet"], ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_delete(self, client: Cloudflare) -> None: event_tag = client.cloudforce_one.threat_events.event_tags.delete( @@ -74,6 +79,7 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(EventTagDeleteResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.event_tags.with_raw_response.delete( @@ -86,6 +92,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: event_tag = response.parse() assert_matches_type(EventTagDeleteResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.event_tags.with_streaming_response.delete( @@ -100,6 +107,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -112,6 +120,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncEventTags: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: event_tag = await async_client.cloudforce_one.threat_events.event_tags.create( @@ -121,6 +130,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(EventTagCreateResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.event_tags.with_raw_response.create( @@ -134,6 +144,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: event_tag = await response.parse() assert_matches_type(EventTagCreateResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.event_tags.with_streaming_response.create( @@ -149,6 +160,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -158,6 +170,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: tags=["botnet"], ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: event_tag = await async_client.cloudforce_one.threat_events.event_tags.delete( @@ -166,6 +179,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(EventTagDeleteResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.event_tags.with_raw_response.delete( @@ -178,6 +192,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: event_tag = await response.parse() assert_matches_type(EventTagDeleteResponse, event_tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.event_tags.with_streaming_response.delete( @@ -192,6 +207,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py index 44bf37ccffa..6e354ba143b 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_indicator_types.py @@ -17,6 +17,7 @@ class TestIndicatorTypes: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: indicator_type = client.cloudforce_one.threat_events.indicator_types.list( @@ -24,6 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(IndicatorTypeListResponse, indicator_type, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.indicator_types.with_raw_response.list( @@ -35,6 +37,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: indicator_type = response.parse() assert_matches_type(IndicatorTypeListResponse, indicator_type, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.indicator_types.with_streaming_response.list( @@ -52,6 +55,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncIndicatorTypes: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: indicator_type = await async_client.cloudforce_one.threat_events.indicator_types.list( @@ -59,6 +63,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(IndicatorTypeListResponse, indicator_type, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.indicator_types.with_raw_response.list( @@ -70,6 +75,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: indicator_type = await response.parse() assert_matches_type(IndicatorTypeListResponse, indicator_type, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.indicator_types.with_streaming_response.list( diff --git a/tests/api_resources/cloudforce_one/threat_events/test_insights.py b/tests/api_resources/cloudforce_one/threat_events/test_insights.py index 06da194e146..28d6bf1413f 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_insights.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_insights.py @@ -12,7 +12,7 @@ from cloudflare.types.cloudforce_one.threat_events import ( InsightGetResponse, InsightEditResponse, - InsightCreatResponse, + InsightCreateResponse, InsightDeleteResponse, ) @@ -22,105 +22,114 @@ class TestInsights: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_method_delete(self, client: Cloudflare) -> None: - insight = client.cloudforce_one.threat_events.insights.delete( - insight_id="insight_id", - account_id=0, + def test_method_create(self, client: Cloudflare) -> None: + insight = client.cloudforce_one.threat_events.insights.create( event_id="event_id", + account_id=0, + content="Here is some additional context _in markdown_", ) - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + assert_matches_type(InsightCreateResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_raw_response_delete(self, client: Cloudflare) -> None: - response = client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id=0, + def test_raw_response_create(self, client: Cloudflare) -> None: + response = client.cloudforce_one.threat_events.insights.with_raw_response.create( event_id="event_id", + account_id=0, + content="Here is some additional context _in markdown_", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + assert_matches_type(InsightCreateResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_streaming_response_delete(self, client: Cloudflare) -> None: - with client.cloudforce_one.threat_events.insights.with_streaming_response.delete( - insight_id="insight_id", - account_id=0, + def test_streaming_response_create(self, client: Cloudflare) -> None: + with client.cloudforce_one.threat_events.insights.with_streaming_response.create( event_id="event_id", + account_id=0, + content="Here is some additional context _in markdown_", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + assert_matches_type(InsightCreateResponse, insight, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_path_params_delete(self, client: Cloudflare) -> None: + def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id=0, + client.cloudforce_one.threat_events.insights.with_raw_response.create( event_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="", account_id=0, - event_id="event_id", + content="Here is some additional context _in markdown_", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_method_creat(self, client: Cloudflare) -> None: - insight = client.cloudforce_one.threat_events.insights.creat( - event_id="event_id", + def test_method_delete(self, client: Cloudflare) -> None: + insight = client.cloudforce_one.threat_events.insights.delete( + insight_id="insight_id", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) - assert_matches_type(InsightCreatResponse, insight, path=["response"]) + assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_raw_response_creat(self, client: Cloudflare) -> None: - response = client.cloudforce_one.threat_events.insights.with_raw_response.creat( - event_id="event_id", + def test_raw_response_delete(self, client: Cloudflare) -> None: + response = client.cloudforce_one.threat_events.insights.with_raw_response.delete( + insight_id="insight_id", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = response.parse() - assert_matches_type(InsightCreatResponse, insight, path=["response"]) + assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_streaming_response_creat(self, client: Cloudflare) -> None: - with client.cloudforce_one.threat_events.insights.with_streaming_response.creat( - event_id="event_id", + def test_streaming_response_delete(self, client: Cloudflare) -> None: + with client.cloudforce_one.threat_events.insights.with_streaming_response.delete( + insight_id="insight_id", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = response.parse() - assert_matches_type(InsightCreatResponse, insight, path=["response"]) + assert_matches_type(InsightDeleteResponse, insight, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - def test_path_params_creat(self, client: Cloudflare) -> None: + def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - client.cloudforce_one.threat_events.insights.with_raw_response.creat( + client.cloudforce_one.threat_events.insights.with_raw_response.delete( + insight_id="insight_id", + account_id=0, event_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): + client.cloudforce_one.threat_events.insights.with_raw_response.delete( + insight_id="", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit(self, client: Cloudflare) -> None: insight = client.cloudforce_one.threat_events.insights.edit( @@ -131,6 +140,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(InsightEditResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.insights.with_raw_response.edit( @@ -145,6 +155,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: insight = response.parse() assert_matches_type(InsightEditResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.insights.with_streaming_response.edit( @@ -161,6 +172,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -179,6 +191,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: content="Updated: Here is some additional context _in markdown_", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: insight = client.cloudforce_one.threat_events.insights.get( @@ -188,6 +201,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(InsightGetResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.insights.with_raw_response.get( @@ -201,6 +215,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: insight = response.parse() assert_matches_type(InsightGetResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.insights.with_streaming_response.get( @@ -216,6 +231,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -236,105 +252,114 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncInsights: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_method_delete(self, async_client: AsyncCloudflare) -> None: - insight = await async_client.cloudforce_one.threat_events.insights.delete( - insight_id="insight_id", - account_id=0, + async def test_method_create(self, async_client: AsyncCloudflare) -> None: + insight = await async_client.cloudforce_one.threat_events.insights.create( event_id="event_id", + account_id=0, + content="Here is some additional context _in markdown_", ) - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + assert_matches_type(InsightCreateResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: - response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id=0, + async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.create( event_id="event_id", + account_id=0, + content="Here is some additional context _in markdown_", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = await response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + assert_matches_type(InsightCreateResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: - async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.delete( - insight_id="insight_id", - account_id=0, + async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.create( event_id="event_id", + account_id=0, + content="Here is some additional context _in markdown_", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = await response.parse() - assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + assert_matches_type(InsightCreateResponse, insight, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="insight_id", - account_id=0, + await async_client.cloudforce_one.threat_events.insights.with_raw_response.create( event_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( - insight_id="", account_id=0, - event_id="event_id", + content="Here is some additional context _in markdown_", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_method_creat(self, async_client: AsyncCloudflare) -> None: - insight = await async_client.cloudforce_one.threat_events.insights.creat( - event_id="event_id", + async def test_method_delete(self, async_client: AsyncCloudflare) -> None: + insight = await async_client.cloudforce_one.threat_events.insights.delete( + insight_id="insight_id", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) - assert_matches_type(InsightCreatResponse, insight, path=["response"]) + assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_raw_response_creat(self, async_client: AsyncCloudflare) -> None: - response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.creat( - event_id="event_id", + async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: + response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( + insight_id="insight_id", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = await response.parse() - assert_matches_type(InsightCreatResponse, insight, path=["response"]) + assert_matches_type(InsightDeleteResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_streaming_response_creat(self, async_client: AsyncCloudflare) -> None: - async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.creat( - event_id="event_id", + async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: + async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.delete( + insight_id="insight_id", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" insight = await response.parse() - assert_matches_type(InsightCreatResponse, insight, path=["response"]) + assert_matches_type(InsightDeleteResponse, insight, path=["response"]) assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize - async def test_path_params_creat(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): - await async_client.cloudforce_one.threat_events.insights.with_raw_response.creat( + await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( + insight_id="insight_id", + account_id=0, event_id="", + ) + + with pytest.raises(ValueError, match=r"Expected a non-empty value for `insight_id` but received ''"): + await async_client.cloudforce_one.threat_events.insights.with_raw_response.delete( + insight_id="", account_id=0, - content="Here is some additional context _in markdown_", + event_id="event_id", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: insight = await async_client.cloudforce_one.threat_events.insights.edit( @@ -345,6 +370,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(InsightEditResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.edit( @@ -359,6 +385,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: insight = await response.parse() assert_matches_type(InsightEditResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.edit( @@ -375,6 +402,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -393,6 +421,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: content="Updated: Here is some additional context _in markdown_", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: insight = await async_client.cloudforce_one.threat_events.insights.get( @@ -402,6 +431,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(InsightGetResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.insights.with_raw_response.get( @@ -415,6 +445,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: insight = await response.parse() assert_matches_type(InsightGetResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.insights.with_streaming_response.get( @@ -430,6 +461,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_raw.py b/tests/api_resources/cloudforce_one/threat_events/test_raw.py index 25220fb9f2a..eed4ceb498c 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_raw.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_raw.py @@ -17,6 +17,7 @@ class TestRaw: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit(self, client: Cloudflare) -> None: raw = client.cloudforce_one.threat_events.raw.edit( @@ -26,6 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: ) assert_matches_type(RawEditResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_edit_with_all_params(self, client: Cloudflare) -> None: raw = client.cloudforce_one.threat_events.raw.edit( @@ -38,6 +40,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(RawEditResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_edit(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.raw.with_raw_response.edit( @@ -51,6 +54,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: raw = response.parse() assert_matches_type(RawEditResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_edit(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.raw.with_streaming_response.edit( @@ -66,6 +70,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_edit(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -82,6 +87,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None: event_id="event_id", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_get(self, client: Cloudflare) -> None: raw = client.cloudforce_one.threat_events.raw.get( @@ -91,6 +97,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(RawGetResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.raw.with_raw_response.get( @@ -104,6 +111,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: raw = response.parse() assert_matches_type(RawGetResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.raw.with_streaming_response.get( @@ -119,6 +127,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -139,6 +148,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncRaw: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit(self, async_client: AsyncCloudflare) -> None: raw = await async_client.cloudforce_one.threat_events.raw.edit( @@ -148,6 +158,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RawEditResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None: raw = await async_client.cloudforce_one.threat_events.raw.edit( @@ -160,6 +171,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(RawEditResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.raw.with_raw_response.edit( @@ -173,6 +185,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: raw = await response.parse() assert_matches_type(RawEditResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.raw.with_streaming_response.edit( @@ -188,6 +201,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -204,6 +218,7 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: event_id="event_id", ) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: raw = await async_client.cloudforce_one.threat_events.raw.get( @@ -213,6 +228,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RawGetResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.raw.with_raw_response.get( @@ -226,6 +242,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: raw = await response.parse() assert_matches_type(RawGetResponse, raw, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.raw.with_streaming_response.get( @@ -241,6 +258,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_relate.py b/tests/api_resources/cloudforce_one/threat_events/test_relate.py index 844c43856bb..6d774b70187 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_relate.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_relate.py @@ -17,6 +17,7 @@ class TestRelate: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_delete(self, client: Cloudflare) -> None: relate = client.cloudforce_one.threat_events.relate.delete( @@ -25,6 +26,7 @@ def test_method_delete(self, client: Cloudflare) -> None: ) assert_matches_type(RelateDeleteResponse, relate, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_delete(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.relate.with_raw_response.delete( @@ -37,6 +39,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: relate = response.parse() assert_matches_type(RelateDeleteResponse, relate, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_delete(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.relate.with_streaming_response.delete( @@ -51,6 +54,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_path_params_delete(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): @@ -63,6 +67,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None: class TestAsyncRelate: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_delete(self, async_client: AsyncCloudflare) -> None: relate = await async_client.cloudforce_one.threat_events.relate.delete( @@ -71,6 +76,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(RelateDeleteResponse, relate, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.relate.with_raw_response.delete( @@ -83,6 +89,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: relate = await response.parse() assert_matches_type(RelateDeleteResponse, relate, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.relate.with_streaming_response.delete( @@ -97,6 +104,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_id` but received ''"): diff --git a/tests/api_resources/cloudforce_one/threat_events/test_tags.py b/tests/api_resources/cloudforce_one/threat_events/test_tags.py index 5d22afc150c..5daf31ab14c 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_tags.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_tags.py @@ -17,6 +17,7 @@ class TestTags: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_create(self, client: Cloudflare) -> None: tag = client.cloudforce_one.threat_events.tags.create( @@ -25,6 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: ) assert_matches_type(TagCreateResponse, tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_create(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.tags.with_raw_response.create( @@ -37,6 +39,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: tag = response.parse() assert_matches_type(TagCreateResponse, tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_create(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.tags.with_streaming_response.create( @@ -55,6 +58,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: class TestAsyncTags: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_create(self, async_client: AsyncCloudflare) -> None: tag = await async_client.cloudforce_one.threat_events.tags.create( @@ -63,6 +67,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TagCreateResponse, tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.tags.with_raw_response.create( @@ -75,6 +80,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: tag = await response.parse() assert_matches_type(TagCreateResponse, tag, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.tags.with_streaming_response.create( diff --git a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py index 15ddbafb2e1..ff9c030e3eb 100644 --- a/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py +++ b/tests/api_resources/cloudforce_one/threat_events/test_target_industries.py @@ -17,6 +17,7 @@ class TestTargetIndustries: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_method_list(self, client: Cloudflare) -> None: target_industry = client.cloudforce_one.threat_events.target_industries.list( @@ -24,6 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(TargetIndustryListResponse, target_industry, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.cloudforce_one.threat_events.target_industries.with_raw_response.list( @@ -35,6 +37,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: target_industry = response.parse() assert_matches_type(TargetIndustryListResponse, target_industry, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.cloudforce_one.threat_events.target_industries.with_streaming_response.list( @@ -52,6 +55,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: class TestAsyncTargetIndustries: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: target_industry = await async_client.cloudforce_one.threat_events.target_industries.list( @@ -59,6 +63,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(TargetIndustryListResponse, target_industry, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.cloudforce_one.threat_events.target_industries.with_raw_response.list( @@ -70,6 +75,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: target_industry = await response.parse() assert_matches_type(TargetIndustryListResponse, target_industry, path=["response"]) + @pytest.mark.skip(reason="TODO: HTTP 401 from prism") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.cloudforce_one.threat_events.target_industries.with_streaming_response.list( diff --git a/tests/api_resources/security_center/test_insights.py b/tests/api_resources/security_center/test_insights.py index 31edeb1e303..c4776444b97 100644 --- a/tests/api_resources/security_center/test_insights.py +++ b/tests/api_resources/security_center/test_insights.py @@ -21,6 +21,7 @@ class TestInsights: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_method_list(self, client: Cloudflare) -> None: insight = client.security_center.insights.list( @@ -28,6 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[Optional[InsightListResponse]], insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: insight = client.security_center.insights.list( @@ -48,6 +50,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncV4PagePagination[Optional[InsightListResponse]], insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.security_center.insights.with_raw_response.list( @@ -59,6 +62,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: insight = response.parse() assert_matches_type(SyncV4PagePagination[Optional[InsightListResponse]], insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.security_center.insights.with_streaming_response.list( @@ -72,6 +76,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"): @@ -84,6 +89,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="account_id", ) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_method_dismiss(self, client: Cloudflare) -> None: insight = client.security_center.insights.dismiss( @@ -92,6 +98,7 @@ def test_method_dismiss(self, client: Cloudflare) -> None: ) assert_matches_type(InsightDismissResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: insight = client.security_center.insights.dismiss( @@ -101,6 +108,7 @@ def test_method_dismiss_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(InsightDismissResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_raw_response_dismiss(self, client: Cloudflare) -> None: response = client.security_center.insights.with_raw_response.dismiss( @@ -113,6 +121,7 @@ def test_raw_response_dismiss(self, client: Cloudflare) -> None: insight = response.parse() assert_matches_type(InsightDismissResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_streaming_response_dismiss(self, client: Cloudflare) -> None: with client.security_center.insights.with_streaming_response.dismiss( @@ -127,6 +136,7 @@ def test_streaming_response_dismiss(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize def test_path_params_dismiss(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `issue_id` but received ''"): @@ -151,6 +161,7 @@ def test_path_params_dismiss(self, client: Cloudflare) -> None: class TestAsyncInsights: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: insight = await async_client.security_center.insights.list( @@ -158,6 +169,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncV4PagePagination[Optional[InsightListResponse]], insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: insight = await async_client.security_center.insights.list( @@ -178,6 +190,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncV4PagePagination[Optional[InsightListResponse]], insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.security_center.insights.with_raw_response.list( @@ -189,6 +202,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: insight = await response.parse() assert_matches_type(AsyncV4PagePagination[Optional[InsightListResponse]], insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.security_center.insights.with_streaming_response.list( @@ -202,6 +216,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"): @@ -214,6 +229,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="account_id", ) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: insight = await async_client.security_center.insights.dismiss( @@ -222,6 +238,7 @@ async def test_method_dismiss(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(InsightDismissResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflare) -> None: insight = await async_client.security_center.insights.dismiss( @@ -231,6 +248,7 @@ async def test_method_dismiss_with_all_params(self, async_client: AsyncCloudflar ) assert_matches_type(InsightDismissResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None: response = await async_client.security_center.insights.with_raw_response.dismiss( @@ -243,6 +261,7 @@ async def test_raw_response_dismiss(self, async_client: AsyncCloudflare) -> None insight = await response.parse() assert_matches_type(InsightDismissResponse, insight, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) -> None: async with async_client.security_center.insights.with_streaming_response.dismiss( @@ -257,6 +276,7 @@ async def test_streaming_response_dismiss(self, async_client: AsyncCloudflare) - assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate broken prism assertion") @parametrize async def test_path_params_dismiss(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `issue_id` but received ''"): diff --git a/tests/api_resources/test_custom_pages.py b/tests/api_resources/test_custom_pages.py index b057e537379..28b7765c9eb 100644 --- a/tests/api_resources/test_custom_pages.py +++ b/tests/api_resources/test_custom_pages.py @@ -18,6 +18,7 @@ class TestCustomPages: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_method_update(self, client: Cloudflare) -> None: custom_page = client.custom_pages.update( @@ -28,6 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageUpdateResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_method_update_with_all_params(self, client: Cloudflare) -> None: custom_page = client.custom_pages.update( @@ -38,6 +40,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageUpdateResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_raw_response_update(self, client: Cloudflare) -> None: response = client.custom_pages.with_raw_response.update( @@ -52,6 +55,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(Optional[CustomPageUpdateResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_streaming_response_update(self, client: Cloudflare) -> None: with client.custom_pages.with_streaming_response.update( @@ -68,6 +72,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_path_params_update(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -94,6 +99,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: account_id="account_id", ) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_method_list(self, client: Cloudflare) -> None: custom_page = client.custom_pages.list( @@ -101,6 +107,7 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_method_list_with_all_params(self, client: Cloudflare) -> None: custom_page = client.custom_pages.list( @@ -108,6 +115,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(SyncSinglePage[object], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: response = client.custom_pages.with_raw_response.list( @@ -119,6 +127,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(SyncSinglePage[object], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: with client.custom_pages.with_streaming_response.list( @@ -132,6 +141,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_path_params_list(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"): @@ -144,6 +154,7 @@ def test_path_params_list(self, client: Cloudflare) -> None: account_id="account_id", ) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_method_get(self, client: Cloudflare) -> None: custom_page = client.custom_pages.get( @@ -152,6 +163,7 @@ def test_method_get(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: custom_page = client.custom_pages.get( @@ -160,6 +172,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: ) assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_raw_response_get(self, client: Cloudflare) -> None: response = client.custom_pages.with_raw_response.get( @@ -172,6 +185,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: custom_page = response.parse() assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_streaming_response_get(self, client: Cloudflare) -> None: with client.custom_pages.with_streaming_response.get( @@ -186,6 +200,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize def test_path_params_get(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -210,6 +225,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: class TestAsyncCustomPages: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_method_update(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.custom_pages.update( @@ -220,6 +236,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomPageUpdateResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.custom_pages.update( @@ -230,6 +247,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ) assert_matches_type(Optional[CustomPageUpdateResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_pages.with_raw_response.update( @@ -244,6 +262,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(Optional[CustomPageUpdateResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_pages.with_streaming_response.update( @@ -260,6 +279,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): @@ -286,6 +306,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: account_id="account_id", ) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.custom_pages.list( @@ -293,6 +314,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.custom_pages.list( @@ -300,6 +322,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) ) assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_pages.with_raw_response.list( @@ -311,6 +334,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(AsyncSinglePage[object], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_pages.with_streaming_response.list( @@ -324,6 +348,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"You must provide either account_id or zone_id"): @@ -336,6 +361,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None: account_id="account_id", ) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_method_get(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.custom_pages.get( @@ -344,6 +370,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.custom_pages.get( @@ -352,6 +379,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - ) assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: response = await async_client.custom_pages.with_raw_response.get( @@ -364,6 +392,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: custom_page = await response.parse() assert_matches_type(Optional[CustomPageGetResponse], custom_page, path=["response"]) + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: async with async_client.custom_pages.with_streaming_response.get( @@ -378,6 +407,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="TODO: investigate prism failures") @parametrize async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"): diff --git a/tests/api_resources/test_origin_ca_certificates.py b/tests/api_resources/test_origin_ca_certificates.py index fca74933de5..5b4621ccc8a 100644 --- a/tests/api_resources/test_origin_ca_certificates.py +++ b/tests/api_resources/test_origin_ca_certificates.py @@ -63,12 +63,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize def test_method_list(self, client: Cloudflare) -> None: - origin_ca_certificate = client.origin_ca_certificates.list() - assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") - @parametrize - def test_method_list_with_all_params(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -77,7 +71,9 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: - response = client.origin_ca_certificates.with_raw_response.list() + response = client.origin_ca_certificates.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -87,7 +83,9 @@ def test_raw_response_list(self, client: Cloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize def test_streaming_response_list(self, client: Cloudflare) -> None: - with client.origin_ca_certificates.with_streaming_response.list() as response: + with client.origin_ca_certificates.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -226,12 +224,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: - origin_ca_certificate = await async_client.origin_ca_certificates.list() - assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) - - @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) @@ -240,7 +232,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: - response = await async_client.origin_ca_certificates.with_raw_response.list() + response = await async_client.origin_ca_certificates.with_raw_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,7 +244,9 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: @pytest.mark.skip(reason="TODO: investigate auth errors on test suite") @parametrize async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None: - async with async_client.origin_ca_certificates.with_streaming_response.list() as response: + async with async_client.origin_ca_certificates.with_streaming_response.list( + zone_id="023e105f4ecef8ad9ca31a8372d0c353", + ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"