Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jul 11, 2024
1 parent d6580d0 commit 6631170
Show file tree
Hide file tree
Showing 303 changed files with 11,869 additions and 11,869 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1252
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08160758435c3d32f9f1d296fcd9664e5b67e7c453403bf02ac81f023ec470a3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml
84 changes: 42 additions & 42 deletions tests/api_resources/accounts/test_members.py

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions tests/api_resources/accounts/test_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ def test_path_params_list(self, client: Cloudflare) -> None:
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
role = client.accounts.roles.get(
{},
role_id={},
account_id="eb78d65290b24279ba6f44721b3ea3c4",
)
assert_matches_type(object, role, path=["response"])

@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
response = client.accounts.roles.with_raw_response.get(
{},
role_id={},
account_id="eb78d65290b24279ba6f44721b3ea3c4",
)

Expand All @@ -79,7 +79,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
with client.accounts.roles.with_streaming_response.get(
{},
role_id={},
account_id="eb78d65290b24279ba6f44721b3ea3c4",
) as response:
assert not response.is_closed
Expand All @@ -94,7 +94,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.accounts.roles.with_raw_response.get(
{},
role_id={},
account_id="",
)

Expand Down Expand Up @@ -143,15 +143,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
role = await async_client.accounts.roles.get(
{},
role_id={},
account_id="eb78d65290b24279ba6f44721b3ea3c4",
)
assert_matches_type(object, role, path=["response"])

@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
response = await async_client.accounts.roles.with_raw_response.get(
{},
role_id={},
account_id="eb78d65290b24279ba6f44721b3ea3c4",
)

Expand All @@ -163,7 +163,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
async with async_client.accounts.roles.with_streaming_response.get(
{},
role_id={},
account_id="eb78d65290b24279ba6f44721b3ea3c4",
) as response:
assert not response.is_closed
Expand All @@ -178,6 +178,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.accounts.roles.with_raw_response.get(
{},
role_id={},
account_id="",
)
40 changes: 20 additions & 20 deletions tests/api_resources/addressing/address_maps/test_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TestAccounts:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
account = client.addressing.address_maps.accounts.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
Expand All @@ -29,7 +29,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.addressing.address_maps.accounts.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
Expand All @@ -42,7 +42,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.addressing.address_maps.accounts.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
) as response:
Expand All @@ -58,30 +58,30 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.addressing.address_maps.accounts.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
body={},
)

with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"):
client.addressing.address_maps.accounts.with_raw_response.update(
"",
address_map_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)

@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
account = client.addressing.address_maps.accounts.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"])

@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.addressing.address_maps.accounts.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -93,7 +93,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
with client.addressing.address_maps.accounts.with_streaming_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -108,13 +108,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.addressing.address_maps.accounts.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)

with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"):
client.addressing.address_maps.accounts.with_raw_response.delete(
"",
address_map_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -125,7 +125,7 @@ class TestAsyncAccounts:
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account = await async_client.addressing.address_maps.accounts.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
Expand All @@ -134,7 +134,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.addressing.address_maps.accounts.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
Expand All @@ -147,7 +147,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.addressing.address_maps.accounts.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
) as response:
Expand All @@ -163,30 +163,30 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.addressing.address_maps.accounts.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
body={},
)

with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"):
await async_client.addressing.address_maps.accounts.with_raw_response.update(
"",
address_map_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)

@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account = await async_client.addressing.address_maps.accounts.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[AccountDeleteResponse], account, path=["response"])

@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.addressing.address_maps.accounts.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -198,7 +198,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
async with async_client.addressing.address_maps.accounts.with_streaming_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -213,12 +213,12 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.addressing.address_maps.accounts.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
address_map_id="023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)

with pytest.raises(ValueError, match=r"Expected a non-empty value for `address_map_id` but received ''"):
await async_client.addressing.address_maps.accounts.with_raw_response.delete(
"",
address_map_id="",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
Loading

0 comments on commit 6631170

Please sign in to comment.