Document task DB access and unify background task DB handling
This commit is contained in:
@@ -37,12 +37,13 @@ class TestHistorySyncTask:
|
||||
fake_app.state.settings = type("FakeSettings", (), {})()
|
||||
fake_app.state.settings.fail2ban_socket = "/tmp/fake.sock"
|
||||
fake_app.state.settings.database_path = "/tmp/fake.db"
|
||||
fake_app.state.runtime_settings = None
|
||||
|
||||
fake_db = AsyncMock()
|
||||
fake_db.close = AsyncMock()
|
||||
|
||||
with patch(
|
||||
"app.tasks.history_sync.open_db",
|
||||
"app.tasks.db.open_db",
|
||||
new_callable=AsyncMock,
|
||||
return_value=fake_db,
|
||||
), patch(
|
||||
|
||||
Reference in New Issue
Block a user