mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
test: store_manager sanity check
Refs: OPS.19
This commit is contained in:
parent
31b9ed2d01
commit
e4cabf9964
2 changed files with 28 additions and 0 deletions
21
tests/test_store.py
Normal file
21
tests/test_store.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# do not remove this import. This is needed for
|
||||
# pytest fixtures to work
|
||||
import pytest
|
||||
|
||||
from senju.store_manager import StoreManager # noqa: F401
|
||||
|
||||
|
||||
def test_temp_data_dir(store_manager: StoreManager):
|
||||
thing = {
|
||||
"color": "blue",
|
||||
"number": 19,
|
||||
"inner": {
|
||||
"no": "yes"
|
||||
}
|
||||
}
|
||||
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"
|
||||
for key in thing.keys():
|
||||
assert thing[key] == thing_loaded[key]
|
||||
Loading…
Add table
Add a link
Reference in a new issue