foxnouns/tests/test_users.py
2024-03-15 03:48:58 +01:00

13 lines
448 B
Python

import pytest
from quart import Quart
@pytest.mark.asyncio
class TestUsers:
async def test_get_me_returns_403_if_unauthenticated(self, app: Quart):
resp = await app.test_client().get("/api/v2/users/@me")
assert resp.status_code == 403
async def test_get_users_returns_404_if_user_not_found(self, app: Quart):
resp = await app.test_client().get("/api/v2/users/unknown_user")
assert resp.status_code == 404