phi/test/test_api.py

16 lines
428 B
Python

async def test_user_request_not_valid(test_client, api_app):
client = await test_client(api_app)
resp = await client.get('/user')
assert resp.status == 422
resp = None
resp = await client.get('/user/')
assert resp.status == 422
async def test_user_not_found(test_client, api_app):
client = await test_client(api_app)
resp = await client.get('/user/nonexistent')
assert resp.status == 404