9
9
10
10
from cloudflare import Cloudflare , AsyncCloudflare
11
11
from tests .utils import assert_matches_type
12
- from cloudflare .types .zero_trust import DeviceGetResponse , DeviceDevicesListDevicesResponse
12
+ from cloudflare .types .zero_trust import DeviceGetResponse , DeviceListResponse
13
13
14
14
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
15
15
@@ -19,35 +19,35 @@ class TestDevices:
19
19
20
20
@pytest .mark .skip ()
21
21
@parametrize
22
- def test_method_devices_list_devices (self , client : Cloudflare ) -> None :
23
- device = client .zero_trust .devices .devices_list_devices (
22
+ def test_method_list (self , client : Cloudflare ) -> None :
23
+ device = client .zero_trust .devices .list (
24
24
account_id = "699d98642c564d2e855e9661899b7252" ,
25
25
)
26
- assert_matches_type (Optional [DeviceDevicesListDevicesResponse ], device , path = ["response" ])
26
+ assert_matches_type (Optional [DeviceListResponse ], device , path = ["response" ])
27
27
28
28
@pytest .mark .skip ()
29
29
@parametrize
30
- def test_raw_response_devices_list_devices (self , client : Cloudflare ) -> None :
31
- response = client .zero_trust .devices .with_raw_response .devices_list_devices (
30
+ def test_raw_response_list (self , client : Cloudflare ) -> None :
31
+ response = client .zero_trust .devices .with_raw_response .list (
32
32
account_id = "699d98642c564d2e855e9661899b7252" ,
33
33
)
34
34
35
35
assert response .is_closed is True
36
36
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
37
37
device = response .parse ()
38
- assert_matches_type (Optional [DeviceDevicesListDevicesResponse ], device , path = ["response" ])
38
+ assert_matches_type (Optional [DeviceListResponse ], device , path = ["response" ])
39
39
40
40
@pytest .mark .skip ()
41
41
@parametrize
42
- def test_streaming_response_devices_list_devices (self , client : Cloudflare ) -> None :
43
- with client .zero_trust .devices .with_streaming_response .devices_list_devices (
42
+ def test_streaming_response_list (self , client : Cloudflare ) -> None :
43
+ with client .zero_trust .devices .with_streaming_response .list (
44
44
account_id = "699d98642c564d2e855e9661899b7252" ,
45
45
) as response :
46
46
assert not response .is_closed
47
47
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
48
48
49
49
device = response .parse ()
50
- assert_matches_type (Optional [DeviceDevicesListDevicesResponse ], device , path = ["response" ])
50
+ assert_matches_type (Optional [DeviceListResponse ], device , path = ["response" ])
51
51
52
52
assert cast (Any , response .is_closed ) is True
53
53
@@ -103,35 +103,35 @@ class TestAsyncDevices:
103
103
104
104
@pytest .mark .skip ()
105
105
@parametrize
106
- async def test_method_devices_list_devices (self , async_client : AsyncCloudflare ) -> None :
107
- device = await async_client .zero_trust .devices .devices_list_devices (
106
+ async def test_method_list (self , async_client : AsyncCloudflare ) -> None :
107
+ device = await async_client .zero_trust .devices .list (
108
108
account_id = "699d98642c564d2e855e9661899b7252" ,
109
109
)
110
- assert_matches_type (Optional [DeviceDevicesListDevicesResponse ], device , path = ["response" ])
110
+ assert_matches_type (Optional [DeviceListResponse ], device , path = ["response" ])
111
111
112
112
@pytest .mark .skip ()
113
113
@parametrize
114
- async def test_raw_response_devices_list_devices (self , async_client : AsyncCloudflare ) -> None :
115
- response = await async_client .zero_trust .devices .with_raw_response .devices_list_devices (
114
+ async def test_raw_response_list (self , async_client : AsyncCloudflare ) -> None :
115
+ response = await async_client .zero_trust .devices .with_raw_response .list (
116
116
account_id = "699d98642c564d2e855e9661899b7252" ,
117
117
)
118
118
119
119
assert response .is_closed is True
120
120
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
121
121
device = await response .parse ()
122
- assert_matches_type (Optional [DeviceDevicesListDevicesResponse ], device , path = ["response" ])
122
+ assert_matches_type (Optional [DeviceListResponse ], device , path = ["response" ])
123
123
124
124
@pytest .mark .skip ()
125
125
@parametrize
126
- async def test_streaming_response_devices_list_devices (self , async_client : AsyncCloudflare ) -> None :
127
- async with async_client .zero_trust .devices .with_streaming_response .devices_list_devices (
126
+ async def test_streaming_response_list (self , async_client : AsyncCloudflare ) -> None :
127
+ async with async_client .zero_trust .devices .with_streaming_response .list (
128
128
account_id = "699d98642c564d2e855e9661899b7252" ,
129
129
) as response :
130
130
assert not response .is_closed
131
131
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
132
132
133
133
device = await response .parse ()
134
- assert_matches_type (Optional [DeviceDevicesListDevicesResponse ], device , path = ["response" ])
134
+ assert_matches_type (Optional [DeviceListResponse ], device , path = ["response" ])
135
135
136
136
assert cast (Any , response .is_closed ) is True
137
137
0 commit comments