2026-10-03 11:20:30 +02:00
|
|
|
from app.settings import Settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_database_url_uses_psycopg_and_explicit_fields() -> None:
|
|
|
|
|
settings = Settings(
|
|
|
|
|
db_host="postgres",
|
|
|
|
|
db_port=5432,
|
|
|
|
|
db_name="buyingagent_test",
|
|
|
|
|
db_user="buyingagent",
|
|
|
|
|
db_password="secret",
|
|
|
|
|
)
|
|
|
|
|
assert settings.database_url == (
|
|
|
|
|
"postgresql+psycopg://buyingagent:secret@postgres:5432/buyingagent_test"
|
|
|
|
|
)
|
2026-10-04 14:53:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_geizhals_live_defaults_are_off_for_fixtures_flag() -> None:
|
|
|
|
|
settings = Settings(geizhals_use_fixtures=True, geizhals_playwright=False)
|
|
|
|
|
assert settings.geizhals_use_fixtures is True
|
|
|
|
|
assert settings.geizhals_playwright is False
|