aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-12-20 07:11:40 +0300
committerFrederick Muriuki Muriithi2023-12-20 07:11:40 +0300
commitc81a3d948b3bc0db20a530fa1aa428b35b5d6145 (patch)
treee43b31fba97b23e23ab981d495afd35a32b6a1c3
parent0aabf202fdf9f70501b350bdf63d01ba922a3ee9 (diff)
downloadgn-uploader-c81a3d948b3bc0db20a530fa1aa428b35b5d6145.tar.gz
Provide instance_path at client creation.
-rw-r--r--tests/conftest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index d8aca81..41dcac1 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -37,9 +37,10 @@ def redis_url():
@pytest.fixture(scope="module")
def client(redis_url): # pylint: disable=[redefined-outer-name]
"Fixture for test client"
- app = create_app(f"{os.path.abspath('.')}/tests/test_instance_dir")
+ app = create_app(os.environ.get("QCAPP_INSTANCE_PATH"))
app.config.update({
- "REDIS_URL": redis_url
+ "REDIS_URL": redis_url,
+ "TESTING": True
})
yield app.test_client()