We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 930e8c6 commit 14a5a3aCopy full SHA for 14a5a3a
main.py
@@ -120,4 +120,4 @@ def secure_data(token: str = Query(...)):
120
if token == API_SECRET:
121
return {"data": "Sensitive Data"}
122
123
- return JSONResponse(status_code=403, content={"message": "Forbidden"})
+ return JSONResponse(status_code=403, content={"message": "Forbidden"})
tests/test_main.py
@@ -115,4 +115,4 @@ def test_secure_data_with_invalid_token():
115
"""
116
response = client.get("/secure-data", params={"token": "wrong_token"})
117
assert response.status_code == 403
118
- assert response.json() == {"message": "Forbidden"}
+ assert response.json() == {"message": "Forbidden"}
0 commit comments