aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-07-18 18:55:57 +0200
committerDaniel Schadt <kingdread@gmx.de>2022-07-18 18:55:57 +0200
commitc1c81247e8c8a451589d788412bfffdd6a82e238 (patch)
tree273aa6bdf77e06f3cbe039dcfad55c8b2287183b
parentf8c198709120cf94d9e7263d5979c4cf0dc95b67 (diff)
downloadfietsboek-c1c81247e8c8a451589d788412bfffdd6a82e238.tar.gz
fietsboek-c1c81247e8c8a451589d788412bfffdd6a82e238.tar.bz2
fietsboek-c1c81247e8c8a451589d788412bfffdd6a82e238.zip
give tests a temporary data dir
-rw-r--r--tests/conftest.py3
1 files changed, 2 insertions, 1 deletions
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