aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/conftest.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-23 16:31:39 +0300
committerFrederick Muriuki Muriithi2024-04-23 16:31:39 +0300
commit807e5322986bf9907cc7badfbbb5c4866353079c (patch)
tree328d153a3d58643858269e3b5d111417336b361f /tests/unit/conftest.py
parent48d6cb588a62cd616d4763e3baa635f0551f893b (diff)
downloadgn-auth-807e5322986bf9907cc7badfbbb5c4866353079c.tar.gz
tests: Add missing configs to allow tests to run.
Diffstat (limited to 'tests/unit/conftest.py')
-rw-r--r--tests/unit/conftest.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index 2230f7a..dd94899 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -1,4 +1,5 @@
"""Fixtures for unit tests."""
+import os
from pathlib import Path
from datetime import datetime
from tempfile import TemporaryDirectory
@@ -14,10 +15,15 @@ def fxtr_app():
with TemporaryDirectory() as testdir:
testdb = Path(testdir).joinpath(
f'testdb_{datetime.now().strftime("%Y%m%dT%H%M%S")}')
+ testuploadsdir = Path(testdir).joinpath("uploads")
+ testuploadsdir.mkdir()
app = create_app({
- "TESTING": True, "AUTH_DB": testdb,
+ "TESTING": True,
+ "AUTH_DB": testdb,
"OAUTH2_ACCESS_TOKEN_GENERATOR": "tests.unit.auth.test_token.gen_token",
- "SECRET_KEY": "qQIrgiK29kXZU6v8D09y4uw_sk8I4cqgNZniYUrRoUk"
+ "SECRET_KEY": "qQIrgiK29kXZU6v8D09y4uw_sk8I4cqgNZniYUrRoUk",
+ "UPLOADS_DIR": testuploadsdir,
+ "SSL_PRIVATE_KEY": f"{os.path.dirname(__file__)}/test-ssl-private-key.pem"
})
app.testing = True
yield app