refactor: fix search result for library test
This commit is contained in:
parent
82eb6e4ae3
commit
eec96e4f1f
1 changed files with 6 additions and 4 deletions
|
|
@ -90,15 +90,17 @@ async def main():
|
||||||
)
|
)
|
||||||
|
|
||||||
search_results = await cognee.search(
|
search_results = await cognee.search(
|
||||||
query_type=SearchType.GRAPH_COMPLETION, query_text="What information do you contain?"
|
query_type=SearchType.GRAPH_COMPLETION,
|
||||||
|
query_text="What information do you contain?",
|
||||||
|
dataset_ids=[pipeline_run_obj.dataset_id],
|
||||||
)
|
)
|
||||||
assert "Mark" in search_results[0], (
|
assert "Mark" in search_results[0]["search_result"][0], (
|
||||||
"Failed to update document, no mention of Mark in search results"
|
"Failed to update document, no mention of Mark in search results"
|
||||||
)
|
)
|
||||||
assert "Cindy" in search_results[0], (
|
assert "Cindy" in search_results[0]["search_result"][0], (
|
||||||
"Failed to update document, no mention of Cindy in search results"
|
"Failed to update document, no mention of Cindy in search results"
|
||||||
)
|
)
|
||||||
assert "Artificial intelligence" not in search_results[0], (
|
assert "Artificial intelligence" not in search_results[0]["search_result"][0], (
|
||||||
"Failed to update document, Artificial intelligence still mentioned in search results"
|
"Failed to update document, Artificial intelligence still mentioned in search results"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue