1111from tests .utils import assert_matches_type
1212from writerai .pagination import SyncApplicationJobsOffset , AsyncApplicationJobsOffset
1313from writerai .types .applications import (
14- JobListResponse ,
1514 JobRetryResponse ,
1615 JobCreateResponse ,
17- JobRetrieveResponse ,
16+ ApplicationGenerateAsyncResponse ,
1817)
1918
2019base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
@@ -90,7 +89,7 @@ def test_method_retrieve(self, client: Writer) -> None:
9089 job = client .applications .jobs .retrieve (
9190 "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
9291 )
93- assert_matches_type (JobRetrieveResponse , job , path = ["response" ])
92+ assert_matches_type (ApplicationGenerateAsyncResponse , job , path = ["response" ])
9493
9594 @parametrize
9695 def test_raw_response_retrieve (self , client : Writer ) -> None :
@@ -101,7 +100,7 @@ def test_raw_response_retrieve(self, client: Writer) -> None:
101100 assert response .is_closed is True
102101 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
103102 job = response .parse ()
104- assert_matches_type (JobRetrieveResponse , job , path = ["response" ])
103+ assert_matches_type (ApplicationGenerateAsyncResponse , job , path = ["response" ])
105104
106105 @parametrize
107106 def test_streaming_response_retrieve (self , client : Writer ) -> None :
@@ -112,7 +111,7 @@ def test_streaming_response_retrieve(self, client: Writer) -> None:
112111 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
113112
114113 job = response .parse ()
115- assert_matches_type (JobRetrieveResponse , job , path = ["response" ])
114+ assert_matches_type (ApplicationGenerateAsyncResponse , job , path = ["response" ])
116115
117116 assert cast (Any , response .is_closed ) is True
118117
@@ -128,7 +127,7 @@ def test_method_list(self, client: Writer) -> None:
128127 job = client .applications .jobs .list (
129128 application_id = "application_id" ,
130129 )
131- assert_matches_type (SyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
130+ assert_matches_type (SyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
132131
133132 @parametrize
134133 def test_method_list_with_all_params (self , client : Writer ) -> None :
@@ -138,7 +137,7 @@ def test_method_list_with_all_params(self, client: Writer) -> None:
138137 offset = 0 ,
139138 status = "in_progress" ,
140139 )
141- assert_matches_type (SyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
140+ assert_matches_type (SyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
142141
143142 @parametrize
144143 def test_raw_response_list (self , client : Writer ) -> None :
@@ -149,7 +148,7 @@ def test_raw_response_list(self, client: Writer) -> None:
149148 assert response .is_closed is True
150149 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
151150 job = response .parse ()
152- assert_matches_type (SyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
151+ assert_matches_type (SyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
153152
154153 @parametrize
155154 def test_streaming_response_list (self , client : Writer ) -> None :
@@ -160,7 +159,7 @@ def test_streaming_response_list(self, client: Writer) -> None:
160159 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
161160
162161 job = response .parse ()
163- assert_matches_type (SyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
162+ assert_matches_type (SyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
164163
165164 assert cast (Any , response .is_closed ) is True
166165
@@ -280,7 +279,7 @@ async def test_method_retrieve(self, async_client: AsyncWriter) -> None:
280279 job = await async_client .applications .jobs .retrieve (
281280 "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
282281 )
283- assert_matches_type (JobRetrieveResponse , job , path = ["response" ])
282+ assert_matches_type (ApplicationGenerateAsyncResponse , job , path = ["response" ])
284283
285284 @parametrize
286285 async def test_raw_response_retrieve (self , async_client : AsyncWriter ) -> None :
@@ -291,7 +290,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncWriter) -> None:
291290 assert response .is_closed is True
292291 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
293292 job = await response .parse ()
294- assert_matches_type (JobRetrieveResponse , job , path = ["response" ])
293+ assert_matches_type (ApplicationGenerateAsyncResponse , job , path = ["response" ])
295294
296295 @parametrize
297296 async def test_streaming_response_retrieve (self , async_client : AsyncWriter ) -> None :
@@ -302,7 +301,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncWriter) -> N
302301 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
303302
304303 job = await response .parse ()
305- assert_matches_type (JobRetrieveResponse , job , path = ["response" ])
304+ assert_matches_type (ApplicationGenerateAsyncResponse , job , path = ["response" ])
306305
307306 assert cast (Any , response .is_closed ) is True
308307
@@ -318,7 +317,7 @@ async def test_method_list(self, async_client: AsyncWriter) -> None:
318317 job = await async_client .applications .jobs .list (
319318 application_id = "application_id" ,
320319 )
321- assert_matches_type (AsyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
320+ assert_matches_type (AsyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
322321
323322 @parametrize
324323 async def test_method_list_with_all_params (self , async_client : AsyncWriter ) -> None :
@@ -328,7 +327,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncWriter) -> N
328327 offset = 0 ,
329328 status = "in_progress" ,
330329 )
331- assert_matches_type (AsyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
330+ assert_matches_type (AsyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
332331
333332 @parametrize
334333 async def test_raw_response_list (self , async_client : AsyncWriter ) -> None :
@@ -339,7 +338,7 @@ async def test_raw_response_list(self, async_client: AsyncWriter) -> None:
339338 assert response .is_closed is True
340339 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
341340 job = await response .parse ()
342- assert_matches_type (AsyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
341+ assert_matches_type (AsyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
343342
344343 @parametrize
345344 async def test_streaming_response_list (self , async_client : AsyncWriter ) -> None :
@@ -350,7 +349,7 @@ async def test_streaming_response_list(self, async_client: AsyncWriter) -> None:
350349 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
351350
352351 job = await response .parse ()
353- assert_matches_type (AsyncApplicationJobsOffset [JobListResponse ], job , path = ["response" ])
352+ assert_matches_type (AsyncApplicationJobsOffset [ApplicationGenerateAsyncResponse ], job , path = ["response" ])
354353
355354 assert cast (Any , response .is_closed ) is True
356355
0 commit comments