|
|
@ -23,7 +23,7 @@ def test_security_http_digest(): |
|
|
|
|
|
|
|
def test_security_http_digest_no_credentials(): |
|
|
|
response = client.get("/users/me") |
|
|
|
assert response.status_code == 403, response.text |
|
|
|
assert response.status_code == 401, response.text |
|
|
|
assert response.json() == {"detail": "Not authenticated"} |
|
|
|
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ def test_security_http_digest_incorrect_scheme_credentials(): |
|
|
|
response = client.get( |
|
|
|
"/users/me", headers={"Authorization": "Other invalidauthorization"} |
|
|
|
) |
|
|
|
assert response.status_code == 403, response.text |
|
|
|
assert response.status_code == 401, response.text |
|
|
|
assert response.json() == {"detail": "Invalid authentication credentials"} |
|
|
|
|
|
|
|
|
|
|
|