Skip to content

Commit

Permalink
tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 20, 2025
1 parent 683f23d commit 78c7d7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/core/test_context_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async def attached_dict(self) -> ContextDict:
async def prefilled_dict(self) -> ContextDict:
# Attached pre-filled context dictionary
ctx_id = "ctx1"
storage = MemoryContextStorage(rewrite_existing=False, partial_read_config={"requests": 1})
storage = MemoryContextStorage(rewrite_existing=True, partial_read_config={"requests": 1})
await storage.update_main_info(ctx_id, ContextInfo(turn_id=0, created_at=0, updated_at=0))
requests = [
(1, Message("longer text", misc={"k": "v"}).model_dump_json().encode()),
Expand Down Expand Up @@ -88,7 +88,7 @@ async def test_load_len_in_contains_keys_values(self, prefilled_dict: ContextDic
assert await prefilled_dict.get(100, None) is None
assert await prefilled_dict.get(1, None) is not None
assert prefilled_dict._added == set()
assert len(prefilled_dict._hashes) == 2
assert len(prefilled_dict._hashes) == 1
assert len(prefilled_dict._items) == 2
# Deleting loaded item
del prefilled_dict[1]
Expand Down

0 comments on commit 78c7d7c

Please sign in to comment.