@@ -26,15 +26,22 @@ class TestMessages:
2626 def test_method_create (self , client : Asktable ) -> None :
2727 message = client .chats .messages .create (
2828 chat_id = "chat_id" ,
29- question = "question" ,
29+ )
30+ assert_matches_type (MessageCreateResponse , message , path = ["response" ])
31+
32+ @parametrize
33+ def test_method_create_with_all_params (self , client : Asktable ) -> None :
34+ message = client .chats .messages .create (
35+ chat_id = "chat_id" ,
36+ query_question = "question" ,
37+ body_question = "question" ,
3038 )
3139 assert_matches_type (MessageCreateResponse , message , path = ["response" ])
3240
3341 @parametrize
3442 def test_raw_response_create (self , client : Asktable ) -> None :
3543 response = client .chats .messages .with_raw_response .create (
3644 chat_id = "chat_id" ,
37- question = "question" ,
3845 )
3946
4047 assert response .is_closed is True
@@ -46,7 +53,6 @@ def test_raw_response_create(self, client: Asktable) -> None:
4653 def test_streaming_response_create (self , client : Asktable ) -> None :
4754 with client .chats .messages .with_streaming_response .create (
4855 chat_id = "chat_id" ,
49- question = "question" ,
5056 ) as response :
5157 assert not response .is_closed
5258 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -61,7 +67,6 @@ def test_path_params_create(self, client: Asktable) -> None:
6167 with pytest .raises (ValueError , match = r"Expected a non-empty value for `chat_id` but received ''" ):
6268 client .chats .messages .with_raw_response .create (
6369 chat_id = "" ,
64- question = "question" ,
6570 )
6671
6772 @parametrize
@@ -169,15 +174,22 @@ class TestAsyncMessages:
169174 async def test_method_create (self , async_client : AsyncAsktable ) -> None :
170175 message = await async_client .chats .messages .create (
171176 chat_id = "chat_id" ,
172- question = "question" ,
177+ )
178+ assert_matches_type (MessageCreateResponse , message , path = ["response" ])
179+
180+ @parametrize
181+ async def test_method_create_with_all_params (self , async_client : AsyncAsktable ) -> None :
182+ message = await async_client .chats .messages .create (
183+ chat_id = "chat_id" ,
184+ query_question = "question" ,
185+ body_question = "question" ,
173186 )
174187 assert_matches_type (MessageCreateResponse , message , path = ["response" ])
175188
176189 @parametrize
177190 async def test_raw_response_create (self , async_client : AsyncAsktable ) -> None :
178191 response = await async_client .chats .messages .with_raw_response .create (
179192 chat_id = "chat_id" ,
180- question = "question" ,
181193 )
182194
183195 assert response .is_closed is True
@@ -189,7 +201,6 @@ async def test_raw_response_create(self, async_client: AsyncAsktable) -> None:
189201 async def test_streaming_response_create (self , async_client : AsyncAsktable ) -> None :
190202 async with async_client .chats .messages .with_streaming_response .create (
191203 chat_id = "chat_id" ,
192- question = "question" ,
193204 ) as response :
194205 assert not response .is_closed
195206 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -204,7 +215,6 @@ async def test_path_params_create(self, async_client: AsyncAsktable) -> None:
204215 with pytest .raises (ValueError , match = r"Expected a non-empty value for `chat_id` but received ''" ):
205216 await async_client .chats .messages .with_raw_response .create (
206217 chat_id = "" ,
207- question = "question" ,
208218 )
209219
210220 @parametrize
0 commit comments