mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-20 05:18:16 +00:00
fix: fix test actually running (#587)
* fix: fix test actually running * fix: fix test to not send request to openai * fix: fix linting to remove cli files * fix: exclude only files that breaks black
This commit is contained in:
committed by
GitHub
parent
95d13bd033
commit
1da7473f26
@@ -10,6 +10,7 @@ def short_term_memory():
|
||||
return ShortTermMemory()
|
||||
|
||||
|
||||
@pytest.mark.vcr(filter_headers=["authorization"])
|
||||
def test_save_and_search(short_term_memory):
|
||||
memory = ShortTermMemoryItem(
|
||||
data="""test value test value test value test value test value test value
|
||||
@@ -19,6 +20,7 @@ def test_save_and_search(short_term_memory):
|
||||
metadata={"task": "test_task"},
|
||||
)
|
||||
short_term_memory.save(memory)
|
||||
|
||||
find = short_term_memory.search("test value", score_threshold=0.01)[0]
|
||||
assert find["context"] == memory.data, "Data value mismatch."
|
||||
assert find["metadata"]["agent"] == "test_agent", "Agent value mismatch."
|
||||
|
||||
Reference in New Issue
Block a user