From c7e29e399bff9e3b7ced79f15c80ca3f79c7b9ae Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Fri, 28 May 2021 12:26:51 +0200 Subject: [PATCH] =?UTF-8?q?[tests]=C2=A0use=20"isinstance"=20instead=20of?= =?UTF-8?q?=20"type"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_jwt_middleware.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_jwt_middleware.py b/tests/test_jwt_middleware.py index eb6604b..073b28b 100644 --- a/tests/test_jwt_middleware.py +++ b/tests/test_jwt_middleware.py @@ -122,8 +122,8 @@ async def test_JWTAuthenticationBackend(token_builder): }) credentials, user = await backend.authenticate(req) - assert type(user) == JWTUser - assert type(credentials) == AuthCredentials + assert isinstance(user, JWTUser) + assert isinstance(credentials, AuthCredentials) @pytest.mark.asyncio @@ -137,8 +137,8 @@ async def test_JWTAuthenticationBackend_DebugFalse(token_debug_false_builder): }) credentials, user = await backend.authenticate(req) - assert type(user) == JWTUser - assert type(credentials) == AuthCredentials + assert isinstance(user, JWTUser) + assert isinstance(credentials, AuthCredentials) @pytest.mark.asyncio