99
1010from asktable import Asktable , AsyncAsktable
1111from tests .utils import assert_matches_type
12- from asktable .types import Chat , ChatSendMessageResponse
12+ from asktable .types import (
13+ Chat ,
14+ ChatRetrieveResponse ,
15+ ChatSendMessageResponse ,
16+ )
1317from asktable .pagination import SyncPage , AsyncPage
1418
1519base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
@@ -63,7 +67,7 @@ def test_method_retrieve(self, client: Asktable) -> None:
6367 chat = client .chats .retrieve (
6468 "chat_id" ,
6569 )
66- assert_matches_type (Chat , chat , path = ["response" ])
70+ assert_matches_type (ChatRetrieveResponse , chat , path = ["response" ])
6771
6872 @parametrize
6973 def test_raw_response_retrieve (self , client : Asktable ) -> None :
@@ -74,7 +78,7 @@ def test_raw_response_retrieve(self, client: Asktable) -> None:
7478 assert response .is_closed is True
7579 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
7680 chat = response .parse ()
77- assert_matches_type (Chat , chat , path = ["response" ])
81+ assert_matches_type (ChatRetrieveResponse , chat , path = ["response" ])
7882
7983 @parametrize
8084 def test_streaming_response_retrieve (self , client : Asktable ) -> None :
@@ -85,7 +89,7 @@ def test_streaming_response_retrieve(self, client: Asktable) -> None:
8589 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
8690
8791 chat = response .parse ()
88- assert_matches_type (Chat , chat , path = ["response" ])
92+ assert_matches_type (ChatRetrieveResponse , chat , path = ["response" ])
8993
9094 assert cast (Any , response .is_closed ) is True
9195
@@ -258,7 +262,7 @@ async def test_method_retrieve(self, async_client: AsyncAsktable) -> None:
258262 chat = await async_client .chats .retrieve (
259263 "chat_id" ,
260264 )
261- assert_matches_type (Chat , chat , path = ["response" ])
265+ assert_matches_type (ChatRetrieveResponse , chat , path = ["response" ])
262266
263267 @parametrize
264268 async def test_raw_response_retrieve (self , async_client : AsyncAsktable ) -> None :
@@ -269,7 +273,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncAsktable) -> None:
269273 assert response .is_closed is True
270274 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
271275 chat = await response .parse ()
272- assert_matches_type (Chat , chat , path = ["response" ])
276+ assert_matches_type (ChatRetrieveResponse , chat , path = ["response" ])
273277
274278 @parametrize
275279 async def test_streaming_response_retrieve (self , async_client : AsyncAsktable ) -> None :
@@ -280,7 +284,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncAsktable) ->
280284 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
281285
282286 chat = await response .parse ()
283- assert_matches_type (Chat , chat , path = ["response" ])
287+ assert_matches_type (ChatRetrieveResponse , chat , path = ["response" ])
284288
285289 assert cast (Any , response .is_closed ) is True
286290
0 commit comments