From 29ebc4501358a439a1a422244b688bbaf2f60583 Mon Sep 17 00:00:00 2001 From: Richard Nemeth Date: Fri, 23 Jun 2023 07:35:51 +0200 Subject: [PATCH] test: fix the token test --- tests/test_keycloak_openid.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_keycloak_openid.py b/tests/test_keycloak_openid.py index 712c4bc..6ab9a8f 100644 --- a/tests/test_keycloak_openid.py +++ b/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,