From a25bfe0b3a542b497cd81c6a49c5e0b62c2632bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Fri, 10 Jan 2025 10:53:15 +0100 Subject: [PATCH] =?UTF-8?q?tests:=C2=A0fix=20missing=20/=20in=20sqlite=20p?= =?UTF-8?q?aths?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/app/test_configuration.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/app/test_configuration.py b/tests/app/test_configuration.py index 1f47cf44..2e5611fc 100644 --- a/tests/app/test_configuration.py +++ b/tests/app/test_configuration.py @@ -44,18 +44,19 @@ def test_configuration_from_environment_vars(tmp_path): """Canaille should read configuration from environment vars.""" os.environ["SECRET_KEY"] = "very-very-secret" os.environ["CANAILLE__SMTP__FROM_ADDR"] = "user@mydomain.test" - os.environ["CANAILLE_SQL__DATABASE_URI"] = f"sqlite://{tmp_path}/anything.db" + os.environ["CANAILLE_SQL__DATABASE_URI"] = f"sqlite:///{tmp_path}/anything.db" conf = settings_factory({"TIMEZONE": "UTC"}) assert conf.SECRET_KEY == "very-very-secret" assert conf.CANAILLE.SMTP.FROM_ADDR == "user@mydomain.test" - assert conf.CANAILLE_SQL.DATABASE_URI == f"sqlite://{tmp_path}/anything.db" + assert conf.CANAILLE_SQL.DATABASE_URI == f"sqlite:///{tmp_path}/anything.db" app = create_app({"TIMEZONE": "UTC"}) assert app.config["SECRET_KEY"] == "very-very-secret" assert app.config["CANAILLE"]["SMTP"]["FROM_ADDR"] == "user@mydomain.test" assert ( - app.config["CANAILLE_SQL"]["DATABASE_URI"] == f"sqlite://{tmp_path}/anything.db" + app.config["CANAILLE_SQL"]["DATABASE_URI"] + == f"sqlite:///{tmp_path}/anything.db" ) del os.environ["SECRET_KEY"]