Skip to content

Commit c87b536

Browse files
chore(api): skip broken prism tests
Skips codegen'd tests that aren't working right. - connector tests need an schema tweak to express mutually exclusive properties - cf-one is referencing an invalid security scheme, will also need a schema update
1 parent 9e6eb88 commit c87b536

3 files changed

Lines changed: 39 additions & 1 deletion

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1769
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-22bd279cee32addc645f421ef52b9cc207ec998f883e77e580f7be79950833b4.yml
33
openapi_spec_hash: 3e0f59ac2722028954566a4c850e8849
4-
config_hash: 18e6b76de8b719dd7c9c28614ac32643
4+
config_hash: 70c445587de6c1089e4d0eadb6eb9d9a

tests/api_resources/cloudforce_one/threat_events/datasets/test_health.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
class TestHealth:
1818
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
1919

20+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
2021
@parametrize
2122
def test_method_get(self, client: Cloudflare) -> None:
2223
health = client.cloudforce_one.threat_events.datasets.health.get(
@@ -25,6 +26,7 @@ def test_method_get(self, client: Cloudflare) -> None:
2526
)
2627
assert_matches_type(HealthGetResponse, health, path=["response"])
2728

29+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
2830
@parametrize
2931
def test_raw_response_get(self, client: Cloudflare) -> None:
3032
response = client.cloudforce_one.threat_events.datasets.health.with_raw_response.get(
@@ -37,6 +39,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
3739
health = response.parse()
3840
assert_matches_type(HealthGetResponse, health, path=["response"])
3941

42+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
4043
@parametrize
4144
def test_streaming_response_get(self, client: Cloudflare) -> None:
4245
with client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get(
@@ -51,6 +54,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
5154

5255
assert cast(Any, response.is_closed) is True
5356

57+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
5458
@parametrize
5559
def test_path_params_get(self, client: Cloudflare) -> None:
5660
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -71,6 +75,7 @@ class TestAsyncHealth:
7175
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
7276
)
7377

78+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
7479
@parametrize
7580
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
7681
health = await async_client.cloudforce_one.threat_events.datasets.health.get(
@@ -79,6 +84,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
7984
)
8085
assert_matches_type(HealthGetResponse, health, path=["response"])
8186

87+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
8288
@parametrize
8389
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
8490
response = await async_client.cloudforce_one.threat_events.datasets.health.with_raw_response.get(
@@ -91,6 +97,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
9197
health = await response.parse()
9298
assert_matches_type(HealthGetResponse, health, path=["response"])
9399

100+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
94101
@parametrize
95102
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
96103
async with async_client.cloudforce_one.threat_events.datasets.health.with_streaming_response.get(
@@ -105,6 +112,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
105112

106113
assert cast(Any, response.is_closed) is True
107114

115+
@pytest.mark.skip(reason="TODO: HTTP 401 from prism")
108116
@parametrize
109117
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
110118
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):

tests/api_resources/magic_transit/test_connectors.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
class TestConnectors:
2626
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
2727

28+
@pytest.mark.skip(
29+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
30+
)
2831
@parametrize
2932
def test_method_create(self, client: Cloudflare) -> None:
3033
connector = client.magic_transit.connectors.create(
@@ -33,6 +36,9 @@ def test_method_create(self, client: Cloudflare) -> None:
3336
)
3437
assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
3538

39+
@pytest.mark.skip(
40+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
41+
)
3642
@parametrize
3743
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3844
connector = client.magic_transit.connectors.create(
@@ -49,6 +55,9 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
4955
)
5056
assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
5157

58+
@pytest.mark.skip(
59+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
60+
)
5261
@parametrize
5362
def test_raw_response_create(self, client: Cloudflare) -> None:
5463
response = client.magic_transit.connectors.with_raw_response.create(
@@ -61,6 +70,9 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
6170
connector = response.parse()
6271
assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
6372

73+
@pytest.mark.skip(
74+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
75+
)
6476
@parametrize
6577
def test_streaming_response_create(self, client: Cloudflare) -> None:
6678
with client.magic_transit.connectors.with_streaming_response.create(
@@ -75,6 +87,9 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
7587

7688
assert cast(Any, response.is_closed) is True
7789

90+
@pytest.mark.skip(
91+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
92+
)
7893
@parametrize
7994
def test_path_params_create(self, client: Cloudflare) -> None:
8095
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
@@ -345,6 +360,9 @@ class TestAsyncConnectors:
345360
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
346361
)
347362

363+
@pytest.mark.skip(
364+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
365+
)
348366
@parametrize
349367
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
350368
connector = await async_client.magic_transit.connectors.create(
@@ -353,6 +371,9 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
353371
)
354372
assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
355373

374+
@pytest.mark.skip(
375+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
376+
)
356377
@parametrize
357378
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
358379
connector = await async_client.magic_transit.connectors.create(
@@ -369,6 +390,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
369390
)
370391
assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
371392

393+
@pytest.mark.skip(
394+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
395+
)
372396
@parametrize
373397
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
374398
response = await async_client.magic_transit.connectors.with_raw_response.create(
@@ -381,6 +405,9 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
381405
connector = await response.parse()
382406
assert_matches_type(ConnectorCreateResponse, connector, path=["response"])
383407

408+
@pytest.mark.skip(
409+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
410+
)
384411
@parametrize
385412
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
386413
async with async_client.magic_transit.connectors.with_streaming_response.create(
@@ -395,6 +422,9 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
395422

396423
assert cast(Any, response.is_closed) is True
397424

425+
@pytest.mark.skip(
426+
reason="TODO: consider oneOf instead of maxProperties to indicate that this can be either id or serial_number"
427+
)
398428
@parametrize
399429
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
400430
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):

0 commit comments

Comments
 (0)