test: refactor store manager tests for changes

Refs: 9f3ebf6e98d0fc8a7d32e251a4468866bd55a076 OPS-22
This commit is contained in:
Christoph J. Scherr 2025-02-25 17:56:47 +01:00
parent 4ce43ec54d
commit 588cbeb001
No known key found for this signature in database
GPG key ID: 9EB784BB202BB7BB
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,6 @@
# do not remove this import. This is needed for
# pytest fixtures to work
from pathlib import Path
import pytest # noqa: F401
from senju.haiku import Haiku
@ -36,6 +37,7 @@ def test_save_and_load_haiku(store_manager: StoreManager):
assert h == h_loaded
def test_load_latest_with_empty_store(store_manager: StoreManager):
h = store_manager.load_latest_haiku()
def test_load_latest_with_empty_store(temp_data_dir):
store = StoreManager(temp_data_dir / "empty_store.json")
h = store.get_id_of_latest_haiku()
assert h is None