From 8c8ac04826c63c25b918fb66ddc0f5132b74a223 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 02:10:51 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#372) --- .stats.yml | 2 +- .../api_resources/hyperdrive/test_configs.py | 48 +++---- .../api_resources/magic_transit/test_sites.py | 16 +-- .../page_shield/test_connections.py | 4 +- .../api_resources/page_shield/test_scripts.py | 4 +- .../radar/annotations/test_outages.py | 4 +- tests/api_resources/radar/bgp/test_routes.py | 8 +- .../radar/test_traffic_anomalies.py | 4 +- tests/api_resources/test_pagerules.py | 132 ++++++++++++++---- .../zero_trust/dex/test_http_tests.py | 48 +++---- .../zero_trust/dex/test_traceroute_tests.py | 88 ++++++------ 11 files changed, 221 insertions(+), 137 deletions(-) diff --git a/.stats.yml b/.stats.yml index 83d1643a46f..909fd2a3142 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index 1170bd21c14..33d4e955297 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -67,7 +67,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -87,7 +87,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -110,7 +110,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -126,7 +126,7 @@ def test_method_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -143,7 +143,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -186,7 +186,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -210,7 +210,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -224,7 +224,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -348,7 +348,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -463,7 +463,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -479,7 +479,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -500,7 +500,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -520,7 +520,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -543,7 +543,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -559,7 +559,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -576,7 +576,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -598,7 +598,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -619,7 +619,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -643,7 +643,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -657,7 +657,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, @@ -781,7 +781,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) origin={ "database": "postgres", "host": "database.example.com", - "port": 0, + "port": 5432, "scheme": "postgres", "user": "postgres", }, diff --git a/tests/api_resources/magic_transit/test_sites.py b/tests/api_resources/magic_transit/test_sites.py index f7d405fb2ce..a75f49ec761 100644 --- a/tests/api_resources/magic_transit/test_sites.py +++ b/tests/api_resources/magic_transit/test_sites.py @@ -37,8 +37,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: description="string", ha_mode=True, location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", ) @@ -99,8 +99,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: connector_id="ac60d3d0435248289d446cedd870bcf4", description="string", location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, name="site_1", secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", @@ -328,8 +328,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare description="string", ha_mode=True, location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", ) @@ -390,8 +390,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare connector_id="ac60d3d0435248289d446cedd870bcf4", description="string", location={ - "lat": "string", - "lon": "string", + "lat": "37.6192", + "lon": "122.3816", }, name="site_1", secondary_connector_id="8d67040d3835dbcf46ce29da440dc482", diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index 77edfc01969..4b343c51e30 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, @@ -155,7 +155,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index 50e23e6340d..7896ce43515 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, @@ -157,7 +157,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) export="csv", hosts="blog.cloudflare.com,www.example*,*cloudflare.com", order_by="first_seen_at", - page="string", + page="2", page_url="example.com/page,*/checkout,example.com/*,*checkout*", per_page=100, prioritize_malicious=True, diff --git a/tests/api_resources/radar/annotations/test_outages.py b/tests/api_resources/radar/annotations/test_outages.py index 98c8d58fec8..c0cfec471f9 100644 --- a/tests/api_resources/radar/annotations/test_outages.py +++ b/tests/api_resources/radar/annotations/test_outages.py @@ -31,7 +31,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: outage = client.radar.annotations.outages.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -118,7 +118,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: outage = await async_client.radar.annotations.outages.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py index 9b9ca69370b..1e26b3aa5da 100644 --- a/tests/api_resources/radar/bgp/test_routes.py +++ b/tests/api_resources/radar/bgp/test_routes.py @@ -112,7 +112,7 @@ def test_method_stats(self, client: Cloudflare) -> None: @parametrize def test_method_stats_with_all_params(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.stats( - asn=0, + asn=174, format="JSON", location="US", ) @@ -150,7 +150,7 @@ def test_method_timeseries(self, client: Cloudflare) -> None: @parametrize def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: route = client.radar.bgp.routes.timeseries( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -275,7 +275,7 @@ async def test_method_stats(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_stats_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.stats( - asn=0, + asn=174, format="JSON", location="US", ) @@ -313,7 +313,7 @@ async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None: route = await async_client.radar.bgp.routes.timeseries( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), diff --git a/tests/api_resources/radar/test_traffic_anomalies.py b/tests/api_resources/radar/test_traffic_anomalies.py index ab42d798d32..ad7015ff70a 100644 --- a/tests/api_resources/radar/test_traffic_anomalies.py +++ b/tests/api_resources/radar/test_traffic_anomalies.py @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None: @parametrize def test_method_get_with_all_params(self, client: Cloudflare) -> None: traffic_anomaly = client.radar.traffic_anomalies.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), @@ -76,7 +76,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None: traffic_anomaly = await async_client.radar.traffic_anomalies.get( - asn=0, + asn=174, date_end=parse_datetime("2023-09-01T11:41:33.782Z"), date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), diff --git a/tests/api_resources/test_pagerules.py b/tests/api_resources/test_pagerules.py index 7dd0bcaa81a..cb5cf37444d 100644 --- a/tests/api_resources/test_pagerules.py +++ b/tests/api_resources/test_pagerules.py @@ -29,7 +29,7 @@ class TestPagerules: def test_method_create(self, client: Cloudflare) -> None: pagerule = client.pagerules.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -54,7 +54,21 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -75,7 +89,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: def test_raw_response_create(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -97,7 +111,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: def test_streaming_response_create(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -122,7 +136,7 @@ def test_path_params_create(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): client.pagerules.with_raw_response.create( zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -140,7 +154,7 @@ def test_method_update(self, client: Cloudflare) -> None: pagerule = client.pagerules.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -166,7 +180,21 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -188,7 +216,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: response = client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -211,7 +239,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: with client.pagerules.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -237,7 +265,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -253,7 +281,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: client.pagerules.with_raw_response.update( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -393,7 +421,21 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], priority=0, status="active", @@ -513,7 +555,7 @@ class TestAsyncPagerules: async def test_method_create(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -538,7 +580,21 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -559,7 +615,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.pagerules.with_raw_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -581,7 +637,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.pagerules.with_streaming_response.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -606,7 +662,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): await async_client.pagerules.with_raw_response.create( zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -624,7 +680,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: pagerule = await async_client.pagerules.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -650,7 +706,21 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], targets=[ { @@ -672,7 +742,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: response = await async_client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -695,7 +765,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> async with async_client.pagerules.with_streaming_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -721,7 +791,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.pagerules.with_raw_response.update( "023e105f4ecef8ad9ca31a8372d0c353", zone_id="", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -737,7 +807,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: await async_client.pagerules.with_raw_response.update( "", zone_id="023e105f4ecef8ad9ca31a8372d0c353", - actions=[{}], + actions=[{}, {}, {}], targets=[ { "constraint": { @@ -877,7 +947,21 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "type": "temporary", "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", }, - } + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, + { + "name": "forward_url", + "value": { + "type": "temporary", + "url": "http://www.example.com/somewhere/$1/astring/$2/anotherstring/$3", + }, + }, ], priority=0, status="active", diff --git a/tests/api_resources/zero_trust/dex/test_http_tests.py b/tests/api_resources/zero_trust/dex/test_http_tests.py index 1bee3b8453a..3f929133663 100644 --- a/tests/api_resources/zero_trust/dex/test_http_tests.py +++ b/tests/api_resources/zero_trust/dex/test_http_tests.py @@ -24,8 +24,8 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -36,8 +36,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) @@ -50,8 +50,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -66,8 +66,8 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -85,8 +85,8 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -94,8 +94,8 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) @@ -109,8 +109,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[HTTPDetails], http_test, path=["response"]) @@ -121,8 +121,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) @@ -135,8 +135,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -151,8 +151,8 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,8 +170,8 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -179,6 +179,6 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) diff --git a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py index ee3c35fe683..1ad5e937f61 100644 --- a/tests/api_resources/zero_trust/dex/test_traceroute_tests.py +++ b/tests/api_resources/zero_trust/dex/test_traceroute_tests.py @@ -28,8 +28,8 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -40,8 +40,8 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) @@ -54,8 +54,8 @@ def test_raw_response_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -70,8 +70,8 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -89,8 +89,8 @@ def test_path_params_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -98,8 +98,8 @@ def test_path_params_get(self, client: Cloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) @pytest.mark.skip() @@ -110,8 +110,8 @@ def test_method_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) @@ -123,8 +123,8 @@ def test_raw_response_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -140,8 +140,8 @@ def test_streaming_response_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,8 +160,8 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: account_id="", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -170,8 +170,8 @@ def test_path_params_network_path(self, client: Cloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) @pytest.mark.skip() @@ -260,8 +260,8 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[Traceroute], traceroute_test, path=["response"]) @@ -272,8 +272,8 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", colo="string", device_id=["string", "string", "string"], ) @@ -286,8 +286,8 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -302,8 +302,8 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -321,8 +321,8 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -330,8 +330,8 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: "", account_id="01a7362d577a6c3019a474fd6f485823", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) @pytest.mark.skip() @@ -342,8 +342,8 @@ async def test_method_network_path(self, async_client: AsyncCloudflare) -> None: account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert_matches_type(Optional[NetworkPathResponse], traceroute_test, path=["response"]) @@ -355,8 +355,8 @@ async def test_raw_response_network_path(self, async_client: AsyncCloudflare) -> account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) assert response.is_closed is True @@ -372,8 +372,8 @@ async def test_streaming_response_network_path(self, async_client: AsyncCloudfla account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -392,8 +392,8 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> account_id="", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `test_id` but received ''"): @@ -402,8 +402,8 @@ async def test_path_params_network_path(self, async_client: AsyncCloudflare) -> account_id="01a7362d577a6c3019a474fd6f485823", device_id="string", interval="minute", - time_end="string", - time_start="string", + time_end="1689606812000", + time_start="1689520412000", ) @pytest.mark.skip()