aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/auth/test_token.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-01-03 05:49:53 +0300
committerFrederick Muriuki Muriithi2023-01-03 06:16:28 +0300
commitda33d719105d67afb1ee6b040380211cfa8be23d (patch)
tree825d77283b578c60058afba12fc786df4704d20e /tests/unit/auth/test_token.py
parent27647b38fe1b183010d4c49bce5aa22ea2bb3f48 (diff)
downloadgenenetwork3-da33d719105d67afb1ee6b040380211cfa8be23d.tar.gz
auth: rename fixtures: test_* -> fxtr_*
Since test functions are defined starting with "test_", rename the fixture to more clearly indicate it is a fixture (fxtr_*), an not a test in itself.
Diffstat (limited to 'tests/unit/auth/test_token.py')
-rw-r--r--tests/unit/auth/test_token.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/auth/test_token.py b/tests/unit/auth/test_token.py
index edf4b19..a1709bf 100644
--- a/tests/unit/auth/test_token.py
+++ b/tests/unit/auth/test_token.py
@@ -32,7 +32,7 @@ def gen_token(client, grant_type, user, scope): # pylint: disable=[unused-argume
(("papa", "yada", 2), USERNAME_PASSWORD_FAIL_RESULT),
# (("unaff@iliated.user", "password_for_user_004", 1), USERNAME_PASSWORD_FAIL_RESULT)
))
-def test_token(test_app, fixture_oauth2_clients, test_data, expected):
+def test_token(fxtr_app, fxtr_oauth2_clients, test_data, expected):
"""
GIVEN: a registered oauth2 client, a user
WHEN: a token is requested via the 'password' grant
@@ -42,7 +42,7 @@ def test_token(test_app, fixture_oauth2_clients, test_data, expected):
back
c) TODO: when user tries to use wrong client, we get error message back
"""
- _conn, oa2clients = fixture_oauth2_clients
+ _conn, oa2clients = fxtr_oauth2_clients
email, password, client_idx = test_data
data = {
"grant_type": "password", "scope": "profile nonexistent-scope",
@@ -50,7 +50,7 @@ def test_token(test_app, fixture_oauth2_clients, test_data, expected):
"client_secret": oa2clients[client_idx].client_secret,
"username": email, "password": password}
- with test_app.test_client() as client:
+ with fxtr_app.test_client() as client:
res = client.post("/api/oauth2/token", data=data)
assert res.status_code == expected["status_code"]
for key in expected["result"]: