Browse Source

test: fix the token test

pull/430/merge
Richard Nemeth 2 years ago
parent
commit
29ebc45013
No known key found for this signature in database GPG Key ID: 21C39470DF3DEC39
  1. 12
      tests/test_keycloak_openid.py

12
tests/test_keycloak_openid.py

@ -133,10 +133,10 @@ def test_token(oid_with_credentials: Tuple[KeycloakOpenID, str, str]):
token = oid.token(username=username, password=password)
assert token == {
"access_token": mock.ANY,
"expires_in": 300,
"expires_in": mock.ANY,
"id_token": mock.ANY,
"not-before-policy": 0,
"refresh_expires_in": 1800,
"refresh_expires_in": mock.ANY,
"refresh_token": mock.ANY,
"scope": mock.ANY,
"session_state": mock.ANY,
@ -147,10 +147,10 @@ def test_token(oid_with_credentials: Tuple[KeycloakOpenID, str, str]):
token = oid.token(username=username, password=password, totp="123456")
assert token == {
"access_token": mock.ANY,
"expires_in": 300,
"expires_in": mock.ANY,
"id_token": mock.ANY,
"not-before-policy": 0,
"refresh_expires_in": 1800,
"refresh_expires_in": mock.ANY,
"refresh_token": mock.ANY,
"scope": mock.ANY,
"session_state": mock.ANY,
@ -161,10 +161,10 @@ def test_token(oid_with_credentials: Tuple[KeycloakOpenID, str, str]):
token = oid.token(username=username, password=password, extra_param="foo")
assert token == {
"access_token": mock.ANY,
"expires_in": 300,
"expires_in": mock.ANY,
"id_token": mock.ANY,
"not-before-policy": 0,
"refresh_expires_in": 1800,
"refresh_expires_in": mock.ANY,
"refresh_token": mock.ANY,
"scope": mock.ANY,
"session_state": mock.ANY,

Loading…
Cancel
Save