about summary refs log tree commit diff
path: root/tests/integration/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/conftest.py')
-rw-r--r--tests/integration/conftest.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py
new file mode 100644
index 0000000..be927a4
--- /dev/null
+++ b/tests/integration/conftest.py
@@ -0,0 +1,24 @@
+"""Module that holds fixtures for integration tests"""
+import pytest
+
+from gn3.app import create_app
+from gn3.db_utils import database_connector
+
+@pytest.fixture(scope="session")
+def client():
+    """Create a test client fixture for tests"""
+    # Do some setup
+    app = create_app()
+    app.config.update({"TESTING": True})
+    app.testing = True
+    yield app.test_client()
+    # Do some teardown/cleanup
+
+
+@pytest.fixture
+def db_conn():
+    """Create a db connection fixture for tests"""
+    ## Update this to use temp db once that is in place
+    conn = database_connector()
+    yield conn
+    conn.close()