foxnouns/tests/test_users.py
2024-04-10 20:59:57 +02:00

13 lines
461 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