errors
This commit is contained in:
@@ -41,3 +41,14 @@ def test_clear_removes_token_and_load_returns_none(tmp_path: Path) -> None:
|
||||
|
||||
assert store.load() is None
|
||||
assert not store.path.exists()
|
||||
|
||||
|
||||
def test_get_or_create_device_id_persists_and_is_stable(tmp_path: Path) -> None:
|
||||
path = tmp_path / "tokens" / "7" / "mywhoosh.json"
|
||||
device_id = MyWhooshTokenStore(path).get_or_create_device_id()
|
||||
|
||||
reloaded_id = MyWhooshTokenStore(path).get_or_create_device_id()
|
||||
|
||||
assert reloaded_id == device_id
|
||||
device_id_path = path.with_name("device_id")
|
||||
assert device_id_path.read_text("utf-8").strip() == device_id
|
||||
|
||||
Reference in New Issue
Block a user