From c1c81247e8c8a451589d788412bfffdd6a82e238 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Mon, 18 Jul 2022 18:55:57 +0200 Subject: give tests a temporary data dir --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/conftest.py b/tests/conftest.py index 79f0245..a91d2f4 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -47,7 +47,8 @@ def dbengine(app_settings, ini_file): alembic.command.stamp(alembic_cfg, None, purge=True) @pytest.fixture(scope='session') -def app(app_settings, dbengine): +def app(app_settings, dbengine, tmp_path_factory): + app_settings["fietsboek.data_dir"] = str(tmp_path_factory.mktemp("data")) return main({}, dbengine=dbengine, **app_settings) @pytest.fixture -- cgit v1.2.3