aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-05-13 07:06:41 +0300
committerFrederick Muriuki Muriithi2024-05-13 07:06:41 +0300
commit72e3a384abb539217e49973a7a6681219b5d92cb (patch)
treeb735a271c8569a2c140ae5c773e939799de499a5 /tests
parent2a25cce03405d23a19f984586aab3dd341912fd5 (diff)
downloadgn-auth-72e3a384abb539217e49973a7a6681219b5d92cb.tar.gz
Provide missing `CLIENTS_SSL_PUBLIC_KEYS_DIR` config for tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/conftest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index dd94899..dcf4003 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -12,6 +12,8 @@ from gn_auth import create_app
def fxtr_app():
"""Fixture: setup the test app"""
# Do some setup
+ testsroot = os.path.dirname(__file__)
+
with TemporaryDirectory() as testdir:
testdb = Path(testdir).joinpath(
f'testdb_{datetime.now().strftime("%Y%m%dT%H%M%S")}')
@@ -23,7 +25,8 @@ def fxtr_app():
"OAUTH2_ACCESS_TOKEN_GENERATOR": "tests.unit.auth.test_token.gen_token",
"SECRET_KEY": "qQIrgiK29kXZU6v8D09y4uw_sk8I4cqgNZniYUrRoUk",
"UPLOADS_DIR": testuploadsdir,
- "SSL_PRIVATE_KEY": f"{os.path.dirname(__file__)}/test-ssl-private-key.pem"
+ "SSL_PRIVATE_KEY": f"{testsroot}/test-ssl-private-key.pem",
+ "CLIENTS_SSL_PUBLIC_KEYS_DIR": f"{testsroot}/test-public-keys-dir"
})
app.testing = True
yield app