test(exam): accept 401 or 403 for unauthenticated request
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f52c3267ca
commit
96f9fb2446
@@ -138,7 +138,7 @@ def test_requires_auth_when_not_overridden():
|
|||||||
app.include_router(router, prefix="/api/exam")
|
app.include_router(router, prefix="/api/exam")
|
||||||
# No dependency override → real SupabaseBearer runs and rejects the missing token.
|
# No dependency override → real SupabaseBearer runs and rejects the missing token.
|
||||||
resp = TestClient(app).get("/api/exam/templates")
|
resp = TestClient(app).get("/api/exam/templates")
|
||||||
assert resp.status_code == 403
|
assert resp.status_code in (401, 403) # unauthenticated, not processed
|
||||||
|
|
||||||
|
|
||||||
def test_create_template_sets_owner_and_institute():
|
def test_create_template_sets_owner_and_institute():
|
||||||
|
|||||||
Reference in New Issue
Block a user