Skip to content

Commit d7a0ddb

Browse files
committed
fix test
1 parent fdf70ab commit d7a0ddb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_memory_compaction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def test_generate_memory_hash():
3030
session_id="s1",
3131
memory_type=MemoryTypeEnum.SEMANTIC,
3232
)
33-
# MemoryRecord objects with different IDs will produce different hashes
34-
# since model_dump_json() includes all fields including the ID
35-
assert generate_memory_hash(memory1) != generate_memory_hash(memory2)
33+
# MemoryRecord objects with different IDs but same content will produce the same hash
34+
# since generate_memory_hash() only uses content fields for deduplication
35+
assert generate_memory_hash(memory1) == generate_memory_hash(memory2)
3636
memory3 = MemoryRecord(
3737
id="test-id-3",
3838
text="Paris is the capital of France",

0 commit comments

Comments
 (0)