33from __future__ import annotations
44
55import os
6- from typing import Any , cast
6+ from typing import Any , Optional , cast
77
88import pytest
99
@@ -23,7 +23,7 @@ def test_method_trigger(self, client: Cloudflare) -> None:
2323 activation_check = client .zones .activation_check .trigger (
2424 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
2525 )
26- assert_matches_type (ActivationCheckTriggerResponse , activation_check , path = ["response" ])
26+ assert_matches_type (Optional [ ActivationCheckTriggerResponse ] , activation_check , path = ["response" ])
2727
2828 @pytest .mark .skip ()
2929 @parametrize
@@ -35,7 +35,7 @@ def test_raw_response_trigger(self, client: Cloudflare) -> None:
3535 assert response .is_closed is True
3636 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
3737 activation_check = response .parse ()
38- assert_matches_type (ActivationCheckTriggerResponse , activation_check , path = ["response" ])
38+ assert_matches_type (Optional [ ActivationCheckTriggerResponse ] , activation_check , path = ["response" ])
3939
4040 @pytest .mark .skip ()
4141 @parametrize
@@ -47,7 +47,7 @@ def test_streaming_response_trigger(self, client: Cloudflare) -> None:
4747 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
4848
4949 activation_check = response .parse ()
50- assert_matches_type (ActivationCheckTriggerResponse , activation_check , path = ["response" ])
50+ assert_matches_type (Optional [ ActivationCheckTriggerResponse ] , activation_check , path = ["response" ])
5151
5252 assert cast (Any , response .is_closed ) is True
5353
@@ -69,7 +69,7 @@ async def test_method_trigger(self, async_client: AsyncCloudflare) -> None:
6969 activation_check = await async_client .zones .activation_check .trigger (
7070 zone_id = "023e105f4ecef8ad9ca31a8372d0c353" ,
7171 )
72- assert_matches_type (ActivationCheckTriggerResponse , activation_check , path = ["response" ])
72+ assert_matches_type (Optional [ ActivationCheckTriggerResponse ] , activation_check , path = ["response" ])
7373
7474 @pytest .mark .skip ()
7575 @parametrize
@@ -81,7 +81,7 @@ async def test_raw_response_trigger(self, async_client: AsyncCloudflare) -> None
8181 assert response .is_closed is True
8282 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
8383 activation_check = await response .parse ()
84- assert_matches_type (ActivationCheckTriggerResponse , activation_check , path = ["response" ])
84+ assert_matches_type (Optional [ ActivationCheckTriggerResponse ] , activation_check , path = ["response" ])
8585
8686 @pytest .mark .skip ()
8787 @parametrize
@@ -93,7 +93,7 @@ async def test_streaming_response_trigger(self, async_client: AsyncCloudflare) -
9393 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
9494
9595 activation_check = await response .parse ()
96- assert_matches_type (ActivationCheckTriggerResponse , activation_check , path = ["response" ])
96+ assert_matches_type (Optional [ ActivationCheckTriggerResponse ] , activation_check , path = ["response" ])
9797
9898 assert cast (Any , response .is_closed ) is True
9999
0 commit comments