From c82cf3359b29327e26d06be75a8f0ecdc388e14e Mon Sep 17 00:00:00 2001 From: morvanzhou Date: Thu, 25 Apr 2024 23:38:29 +0800 Subject: [PATCH] fix(app): 1. fix github test hide Authorization --- tests/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 0ff0722..8c5e904 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -12,6 +12,7 @@ from PIL import Image from fastapi.testclient import TestClient from httpx import Response + from retk import const, config, PluginAPICallReturn from retk.application import app from retk.core import account @@ -19,7 +20,6 @@ from retk.models.tps import convert_user_dict_to_authed_user from retk.plugins.register import register_official_plugins, unregister_official_plugins from retk.utils import jwt_decode - from . import utils @@ -228,7 +228,7 @@ async def test_get_new_access_token(self): ) rj = self.check_ok_response(resp, 200) self.assertEqual(818, len(rj["accessToken"])) - self.assertNotEqual(self.default_headers["Authorization"], rj["accessToken"]) + self.assertTrue(self.default_headers["Authorization"] != rj["accessToken"]) self.assertTrue(rj["accessToken"].startswith("Bearer ")) self.assertEqual("", rj["refreshToken"])