Migrate location recorder and refine db config

This commit is contained in:
2026-04-19 21:39:23 +02:00
parent 31390882ef
commit 32cc6847fd
19 changed files with 507 additions and 31 deletions
+15
View File
@@ -0,0 +1,15 @@
from app.config import Settings
def test_settings_support_two_independent_database_urls(monkeypatch) -> None:
monkeypatch.setenv("LOCATION_DATABASE_URL", "sqlite:///./data/locationRecorder.db")
monkeypatch.setenv("POO_DATABASE_URL", "sqlite:///./data/pooRecorder.db")
settings = Settings()
assert settings.location_database_url == "sqlite:///./data/locationRecorder.db"
assert settings.poo_database_url == "sqlite:///./data/pooRecorder.db"
assert settings.location_sqlite_path is not None
assert settings.location_sqlite_path.name == "locationRecorder.db"
assert settings.poo_sqlite_path is not None
assert settings.poo_sqlite_path.name == "pooRecorder.db"