Skip to content

Commit

Permalink
fix(app):
Browse files Browse the repository at this point in the history
1. fix github test hide Authorization
  • Loading branch information
MorvanZhou committed Apr 25, 2024
1 parent c82cf33 commit a8e8fcf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ async def asyncSetUp(self) -> None:
rj = resp.json()
self.assertEqual(818, len(rj["accessToken"]))
self.assertTrue(rj["accessToken"].startswith("Bearer "))
self.access_token = rj["accessToken"]
self.refresh_token = rj["refreshToken"]
self.default_headers = {
"Authorization": rj["accessToken"],
"Authorization": self.access_token,
"RequestId": "xxx",
}

Expand Down Expand Up @@ -228,7 +229,7 @@ async def test_get_new_access_token(self):
)
rj = self.check_ok_response(resp, 200)
self.assertEqual(818, len(rj["accessToken"]))
self.assertTrue(self.default_headers["Authorization"] != rj["accessToken"])
self.assertNotEqual(self.access_token, rj["accessToken"])
self.assertTrue(rj["accessToken"].startswith("Bearer "))
self.assertEqual("", rj["refreshToken"])

Expand Down

0 comments on commit a8e8fcf

Please sign in to comment.