@@ -129,15 +129,15 @@ def test_send_chat_history_validates_turn_context(self, service, chat_history_me
129129 # Act & Assert
130130 with pytest .raises (ValueError , match = "turn_context cannot be empty or None" ):
131131 import asyncio
132+
132133 asyncio .run (service .send_chat_history (None , chat_history_messages ))
133134
134- def test_send_chat_history_validates_chat_history_messages (
135- self , service , mock_turn_context
136- ):
135+ def test_send_chat_history_validates_chat_history_messages (self , service , mock_turn_context ):
137136 """Test that send_chat_history validates chat_history_messages parameter."""
138137 # Act & Assert
139138 with pytest .raises (ValueError , match = "chat_history_messages cannot be empty or None" ):
140139 import asyncio
140+
141141 asyncio .run (service .send_chat_history (mock_turn_context , None ))
142142
143143 def test_send_chat_history_validates_activity (self , service , chat_history_messages ):
@@ -149,6 +149,7 @@ def test_send_chat_history_validates_activity(self, service, chat_history_messag
149149 # Act & Assert
150150 with pytest .raises (ValueError , match = "turn_context.activity cannot be None" ):
151151 import asyncio
152+
152153 asyncio .run (service .send_chat_history (mock_context , chat_history_messages ))
153154
154155 def test_send_chat_history_validates_conversation_id (self , service , chat_history_messages ):
@@ -163,9 +164,11 @@ def test_send_chat_history_validates_conversation_id(self, service, chat_history
163164
164165 # Act & Assert
165166 with pytest .raises (
166- ValueError , match = "conversation_id cannot be empty or None.*turn_context.activity.conversation.id"
167+ ValueError ,
168+ match = "conversation_id cannot be empty or None.*turn_context.activity.conversation.id" ,
167169 ):
168170 import asyncio
171+
169172 asyncio .run (service .send_chat_history (mock_context , chat_history_messages ))
170173
171174 def test_send_chat_history_validates_message_id (self , service , chat_history_messages ):
@@ -185,6 +188,7 @@ def test_send_chat_history_validates_message_id(self, service, chat_history_mess
185188 ValueError , match = "message_id cannot be empty or None.*turn_context.activity.id"
186189 ):
187190 import asyncio
191+
188192 asyncio .run (service .send_chat_history (mock_context , chat_history_messages ))
189193
190194 def test_send_chat_history_validates_user_message (self , service , chat_history_messages ):
@@ -204,6 +208,7 @@ def test_send_chat_history_validates_user_message(self, service, chat_history_me
204208 ValueError , match = "user_message cannot be empty or None.*turn_context.activity.text"
205209 ):
206210 import asyncio
211+
207212 asyncio .run (service .send_chat_history (mock_context , chat_history_messages ))
208213
209214 @pytest .mark .asyncio
0 commit comments