neo-neo-todo/backend/tests/test_route_member.py
minhtrannhat 4a72d88ba2
feat(api): login and authentication routes
- Remove fastapi-limiter, we will rate limit at load balancer level as
it is too hard to get fastapi-limiter to play nice with pytest.
- Wrote technical writeups on how the login flow and check for user
authentication status work
2024-03-23 14:53:33 -04:00

11 lines
310 B
Python

from fastapi.testclient import TestClient
from src.neo_neo_todo.main import app
async def test_get_current_member():
with TestClient(app) as client:
response = client.get("/members/me")
assert response.status_code == 401
assert response.json() == {"detail": "Not authenticated"}