mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
feat(docs): report.md update and refactored tests
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import types
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
from fastapi import status
|
||||
from app.services import user_service
|
||||
|
||||
|
||||
@@ -22,6 +20,15 @@ def test_get_jwt_strategy_lifetime():
|
||||
# Basic smoke check: strategy has a lifetime set to 604800
|
||||
assert getattr(strategy, "lifetime_seconds", None) in (604800,)
|
||||
|
||||
def test_root_ok(client):
|
||||
resp = client.get("/")
|
||||
assert resp.status_code == status.HTTP_200_OK
|
||||
assert resp.json() == {"status": "ok"}
|
||||
|
||||
|
||||
def test_authenticated_route_requires_auth(client):
|
||||
resp = client.get("/authenticated-route")
|
||||
assert resp.status_code in (status.HTTP_401_UNAUTHORIZED, status.HTTP_403_FORBIDDEN)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_on_after_request_verify_enqueues_email(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user