From 3c175bfc4a8683cb67d928d25a9b17f9a807889a Mon Sep 17 00:00:00 2001 From: Leigh Morresi <275001+dgtlmoon@users.noreply.github.com> Date: Sun, 21 Feb 2021 14:08:34 +0100 Subject: [PATCH] Create the test datastore --- backend/tests/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/tests/conftest.py b/backend/tests/conftest.py index a0870911..94c7cb07 100644 --- a/backend/tests/conftest.py +++ b/backend/tests/conftest.py @@ -12,6 +12,7 @@ from backend import store global app + @pytest.fixture(scope='session') def app(request): """Create application for the tests.""" @@ -19,6 +20,12 @@ def app(request): datastore_path = "./test-datastore" import os + try: + os.mkdir(datastore_path) + except FileExistsError: + pass + + try: os.unlink("{}/url-watches.json".format(datastore_path)) except FileNotFoundError: