aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/register_sys_admin.py2
-rw-r--r--tests/unit/auth/fixtures/oauth2_client_fixtures.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/register_sys_admin.py b/scripts/register_sys_admin.py
index 2239fc9..1696adb 100644
--- a/scripts/register_sys_admin.py
+++ b/scripts/register_sys_admin.py
@@ -78,4 +78,4 @@ if __name__ == "__main__":
"""Entry-point for when script is run directly"""
return register_admin(Path(authdbpath).absolute())
- run()
+ run()# pylint: disable=[no-value-for-parameter]
diff --git a/tests/unit/auth/fixtures/oauth2_client_fixtures.py b/tests/unit/auth/fixtures/oauth2_client_fixtures.py
index 41d3ed4..654d048 100644
--- a/tests/unit/auth/fixtures/oauth2_client_fixtures.py
+++ b/tests/unit/auth/fixtures/oauth2_client_fixtures.py
@@ -6,6 +6,7 @@ import datetime
import pytest
from gn3.auth import db
+from gn3.auth.authentication.users import hash_password
from gn3.auth.authentication.oauth2.models.oauth2client import OAuth2Client
@pytest.fixture(autouse=True)
@@ -36,7 +37,7 @@ def fxtr_oauth2_clients(fxtr_users_with_passwords):
with db.cursor(conn) as cursor:
cursor.executemany(
"INSERT INTO oauth2_clients VALUES (?, ?, ?, ?, ?, ?)",
- ((str(client.client_id), client.client_secret,
+ ((str(client.client_id), hash_password(client.client_secret),
int(client.client_id_issued_at.timestamp()),
int(client.client_secret_expires_at.timestamp()),
json.dumps(client.client_metadata), str(client.user.user_id))