mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-12 11:05:42 +00:00
Create the test datastore
This commit is contained in:
@@ -12,6 +12,7 @@ from backend import store
|
|||||||
|
|
||||||
global app
|
global app
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def app(request):
|
def app(request):
|
||||||
"""Create application for the tests."""
|
"""Create application for the tests."""
|
||||||
@@ -19,6 +20,12 @@ def app(request):
|
|||||||
datastore_path = "./test-datastore"
|
datastore_path = "./test-datastore"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
try:
|
||||||
|
os.mkdir(datastore_path)
|
||||||
|
except FileExistsError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.unlink("{}/url-watches.json".format(datastore_path))
|
os.unlink("{}/url-watches.json".format(datastore_path))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|||||||
Reference in New Issue
Block a user