mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
refactor: update store to use the document ids instead of uuids
Refs: OPS-21 OPS-16
This commit is contained in:
parent
d7dece3424
commit
6b6f442408
2 changed files with 19 additions and 36 deletions
|
|
@ -5,7 +5,7 @@ import pytest # noqa: F401
|
|||
from senju.store_manager import StoreManager # noqa: F401
|
||||
|
||||
|
||||
def test_temp_data_dir(store_manager: StoreManager):
|
||||
def test_save_and_load_any(store_manager: StoreManager):
|
||||
thing = {
|
||||
"color": "blue",
|
||||
"number": 19,
|
||||
|
|
@ -13,9 +13,11 @@ def test_temp_data_dir(store_manager: StoreManager):
|
|||
"no": "yes"
|
||||
}
|
||||
}
|
||||
thing_id = store_manager.save(thing)
|
||||
thing_loaded = store_manager.load(thing_id)
|
||||
thing_id = store_manager._save(thing)
|
||||
thing_loaded = store_manager._load(thing_id)
|
||||
|
||||
if thing_loaded is None:
|
||||
assert False, "the store manager load did not return anything"
|
||||
assert False, "store manager load did not return anything but \
|
||||
should have"
|
||||
for key in thing.keys():
|
||||
assert thing[key] == thing_loaded[key]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue