tests: fix dotenv unit test after 21464e952a

This commit is contained in:
Éloi Rivard 2024-12-06 15:06:20 +01:00
parent a5a0fcde23
commit a4985184fa
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184

View file

@ -79,6 +79,7 @@ def test_disable_env_var_loading(tmp_path, configuration):
def test_dotenv_file(tmp_path, configuration):
"""Canaille should read configuration from .env files."""
os.environ["ENV_FILE"] = ".env"
oldcwd = os.getcwd()
os.chdir(tmp_path)
dotenv = tmp_path / ".env"
@ -89,6 +90,7 @@ def test_dotenv_file(tmp_path, configuration):
app = create_app(configuration)
assert app.config["FOOBAR"] == "custom-value"
os.chdir(oldcwd)
del os.environ["ENV_FILE"]
def test_custom_dotenv_file(tmp_path, configuration):