phi/test/test_api.py

16 lines
428 B
Python
Raw Normal View History

2017-12-27 11:02:38 +01:00
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