Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Dec 13, 2024
1 parent 8c34cc1 commit 9b4bdf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/mongodb/tests/integration_tests/test_parent_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def test_1clxn_retriever(
question = "What percentage of the Uniform Bar Examination can GPT4 pass?"
responses = retriever.invoke(question)

if not os.environ.get("OPENAI_API_KEY"):
assert len(responses) == 1
assert responses[0].metadata["page"] == 99
return

assert len(responses) == 3
assert all("GPT-4" in doc.page_content for doc in responses)
assert {4, 5, 29} == set(doc.metadata["page"] for doc in responses)

0 comments on commit 9b4bdf4

Please sign in to comment.