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:
@@ -30,13 +30,21 @@ def _make_app():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def device_store(tmp_path):
|
||||
return DeviceStore(tmp_path / "devices.json")
|
||||
def _route_db(tmp_path):
|
||||
from wled_controller.storage.database import Database
|
||||
db = Database(tmp_path / "test.db")
|
||||
yield db
|
||||
db.close()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def output_target_store(tmp_path):
|
||||
return OutputTargetStore(str(tmp_path / "output_targets.json"))
|
||||
def device_store(_route_db):
|
||||
return DeviceStore(_route_db)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def output_target_store(_route_db):
|
||||
return OutputTargetStore(_route_db)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user