Skip to content

chore(internal): codegen related update #2282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/api_resources/cache/test_cache_reserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class TestCacheReserve:
def test_method_clear(self, client: Cloudflare) -> None:
cache_reserve = client.cache.cache_reserve.clear(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
body="{}",
body={},
)
assert_matches_type(CacheReserveClearResponse, cache_reserve, path=["response"])

@parametrize
def test_raw_response_clear(self, client: Cloudflare) -> None:
response = client.cache.cache_reserve.with_raw_response.clear(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
body="{}",
body={},
)

assert response.is_closed is True
Expand All @@ -46,7 +46,7 @@ def test_raw_response_clear(self, client: Cloudflare) -> None:
def test_streaming_response_clear(self, client: Cloudflare) -> None:
with client.cache.cache_reserve.with_streaming_response.clear(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
body="{}",
body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -61,7 +61,7 @@ def test_path_params_clear(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
client.cache.cache_reserve.with_raw_response.clear(
zone_id="",
body="{}",
body={},
)

@parametrize
Expand Down Expand Up @@ -190,15 +190,15 @@ class TestAsyncCacheReserve:
async def test_method_clear(self, async_client: AsyncCloudflare) -> None:
cache_reserve = await async_client.cache.cache_reserve.clear(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
body="{}",
body={},
)
assert_matches_type(CacheReserveClearResponse, cache_reserve, path=["response"])

@parametrize
async def test_raw_response_clear(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cache.cache_reserve.with_raw_response.clear(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
body="{}",
body={},
)

assert response.is_closed is True
Expand All @@ -210,7 +210,7 @@ async def test_raw_response_clear(self, async_client: AsyncCloudflare) -> None:
async def test_streaming_response_clear(self, async_client: AsyncCloudflare) -> None:
async with async_client.cache.cache_reserve.with_streaming_response.clear(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
body="{}",
body={},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -225,7 +225,7 @@ async def test_path_params_clear(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"):
await async_client.cache.cache_reserve.with_raw_response.clear(
zone_id="",
body="{}",
body={},
)

@parametrize
Expand Down