Skip to content

Commit 15ab505

Browse files
committed
improved test
1 parent 10140a5 commit 15ab505

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

integrations/google_genai/tests/test_chat_generator.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,23 @@ def test_live_run_with_file_content(self, test_files_path):
268268
assert message.is_from(ChatRole.ASSISTANT)
269269

270270
assert message.text
271-
assert "no" in message.text.lower()
271+
indicates_no = any(
272+
phrase in message.text.lower()
273+
for phrase in (
274+
"no",
275+
"nope",
276+
"not about",
277+
"not a paper about",
278+
"it is not",
279+
"it's not",
280+
"the answer is no",
281+
"does not",
282+
"doesn't",
283+
"negative",
284+
)
285+
)
286+
287+
assert indicates_no is True
272288

273289
def test_live_run_streaming(self):
274290
component = GoogleGenAIChatGenerator()

0 commit comments

Comments
 (0)