summaryrefslogtreecommitdiff
path: root/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'conftest.py')
-rw-r--r--conftest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/conftest.py b/conftest.py
new file mode 100644
index 00000000..1e404c1c
--- /dev/null
+++ b/conftest.py
@@ -0,0 +1,13 @@
+import pytest
+
+from main import FLASK_CORE_APP
+
+
+@pytest.fixture
+def client(mocker):
+ """Returns a Flask API client to interact with."""
+ FLASK_CORE_APP.config['TESTING'] = True
+ mocker.patch('opendc.util.database.DB')
+
+ with FLASK_CORE_APP.test_client() as client:
+ yield client