1111from runloop_api_client import Runloop , AsyncRunloop
1212from runloop_api_client .types import (
1313 AxonView ,
14- AxonListView ,
1514 PublishResultView ,
1615)
16+ from runloop_api_client .pagination import SyncAxonsCursorIDPage , AsyncAxonsCursorIDPage
1717
1818base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
1919
@@ -94,7 +94,7 @@ def test_path_params_retrieve(self, client: Runloop) -> None:
9494 @parametrize
9595 def test_method_list (self , client : Runloop ) -> None :
9696 axon = client .axons .list ()
97- assert_matches_type (AxonListView , axon , path = ["response" ])
97+ assert_matches_type (SyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
9898
9999 @parametrize
100100 def test_method_list_with_all_params (self , client : Runloop ) -> None :
@@ -105,7 +105,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
105105 name = "name" ,
106106 starting_after = "starting_after" ,
107107 )
108- assert_matches_type (AxonListView , axon , path = ["response" ])
108+ assert_matches_type (SyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
109109
110110 @parametrize
111111 def test_raw_response_list (self , client : Runloop ) -> None :
@@ -114,7 +114,7 @@ def test_raw_response_list(self, client: Runloop) -> None:
114114 assert response .is_closed is True
115115 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
116116 axon = response .parse ()
117- assert_matches_type (AxonListView , axon , path = ["response" ])
117+ assert_matches_type (SyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
118118
119119 @parametrize
120120 def test_streaming_response_list (self , client : Runloop ) -> None :
@@ -123,7 +123,7 @@ def test_streaming_response_list(self, client: Runloop) -> None:
123123 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
124124
125125 axon = response .parse ()
126- assert_matches_type (AxonListView , axon , path = ["response" ])
126+ assert_matches_type (SyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
127127
128128 assert cast (Any , response .is_closed ) is True
129129
@@ -297,7 +297,7 @@ async def test_path_params_retrieve(self, async_client: AsyncRunloop) -> None:
297297 @parametrize
298298 async def test_method_list (self , async_client : AsyncRunloop ) -> None :
299299 axon = await async_client .axons .list ()
300- assert_matches_type (AxonListView , axon , path = ["response" ])
300+ assert_matches_type (AsyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
301301
302302 @parametrize
303303 async def test_method_list_with_all_params (self , async_client : AsyncRunloop ) -> None :
@@ -308,7 +308,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
308308 name = "name" ,
309309 starting_after = "starting_after" ,
310310 )
311- assert_matches_type (AxonListView , axon , path = ["response" ])
311+ assert_matches_type (AsyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
312312
313313 @parametrize
314314 async def test_raw_response_list (self , async_client : AsyncRunloop ) -> None :
@@ -317,7 +317,7 @@ async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
317317 assert response .is_closed is True
318318 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
319319 axon = await response .parse ()
320- assert_matches_type (AxonListView , axon , path = ["response" ])
320+ assert_matches_type (AsyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
321321
322322 @parametrize
323323 async def test_streaming_response_list (self , async_client : AsyncRunloop ) -> None :
@@ -326,7 +326,7 @@ async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None
326326 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
327327
328328 axon = await response .parse ()
329- assert_matches_type (AxonListView , axon , path = ["response" ])
329+ assert_matches_type (AsyncAxonsCursorIDPage [ AxonView ] , axon , path = ["response" ])
330330
331331 assert cast (Any , response .is_closed ) is True
332332
0 commit comments