fix that the data validation global exception handler does not work (#40)

* fix that the data validation global exception handler does not work

* update login api test

* update the JSON login method to create the user ID of the token
This commit is contained in:
Wu Clan
2023-05-13 01:29:15 +08:00
committed by GitHub
parent 768a13f014
commit 24024d4bf0
7 changed files with 66 additions and 49 deletions

View File

@ -31,7 +31,7 @@ class TestAuth:
url=f'{self.users_api_base_url}/login', data={'username': '1', 'password': '1'}
)
assert response.status_code == 200
assert response.json()['token_type'] == 'Bearer'
assert response.json()['data']['token_type'] == 'Bearer'
async def test_register(self):
async with AsyncClient(