fix: update test fixtures for SQLite storage migration
Some checks failed
Lint & Test / test (push) Failing after 1m33s
Some checks failed
Lint & Test / test (push) Failing after 1m33s
All store tests were passing file paths instead of Database objects after the JSON-to-SQLite migration. Updated fixtures to create temp Database instances, rewrote backup e2e tests for binary .db format, and fixed config tests for the simplified StorageConfig.
This commit is contained in:
@@ -46,10 +46,12 @@ def client(_test_client):
|
||||
|
||||
def _clear_stores():
|
||||
"""Remove all entities from all stores for test isolation."""
|
||||
# Reset the saves-frozen flag that freeze_saves() sets during restore flows.
|
||||
# Without this, subsequent tests can't persist data because _save() is a no-op.
|
||||
# Reset frozen-writes flags that restore flows set.
|
||||
# Without this, subsequent tests can't persist data.
|
||||
from wled_controller.storage.base_store import unfreeze_saves
|
||||
unfreeze_saves()
|
||||
import wled_controller.storage.database as _db_mod
|
||||
_db_mod._writes_frozen = False
|
||||
|
||||
from wled_controller.api import dependencies as deps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user