- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for test_read_admin (0.06 sec)
-
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi_simple.py
@app.get("/admin", dependencies=[Security(get_token, scopes=["read", "write"])]) async def read_admin(): return {"message": "Admin Access"} client = TestClient(app) def test_read_admin(): response = client.get("/admin", headers={"Authorization": "Bearer faketoken"}) assert response.status_code == 200, response.text assert response.json() == {"message": "Admin Access"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.6K bytes - Viewed (0)