Skip to content

Commit 4f4a698

Browse files
improve code
1 parent 242d4ed commit 4f4a698

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _assert_jwt_structure(self, token, expected_sub, expected_type, fresh=False)
6464
expected_delta = None
6565
if expected_type == "access":
6666
expected_delta = self.ACCESS_TOKEN_DELTA
67-
if expected_type == "refresh":
67+
elif expected_type == "refresh":
6868
expected_delta = self.REFRESH_TOKEN_DELTA
6969

7070
if expected_delta is not None:
@@ -143,7 +143,7 @@ def test_refresh_token(self, register_user, login_user):
143143
assert data["access_token"] != original_access_token
144144
assert "refresh_token" not in data
145145

146-
self._assert_jwt_structure(data["access_token"], expected_sub="1", expected_type="access", fresh=False)
146+
self._assert_jwt_structure(data["access_token"], expected_sub="1", expected_type="access")
147147

148148
def test_refresh_token_invalid(self, register_user, login_user):
149149
# Access token test

0 commit comments

Comments
 (0)