test: store_manager sanity check

Refs: OPS.19
This commit is contained in:
Christoph J. Scherr 2025-02-25 15:21:27 +01:00
parent e6b10ce96e
commit 5aba3981ee
No known key found for this signature in database
GPG key ID: 9EB784BB202BB7BB
2 changed files with 28 additions and 0 deletions

21
tests/test_store.py Normal file
View 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]