|
|
|
@ -21,6 +21,12 @@ def test_security_http_base(): |
|
|
|
assert response.json() == {"scheme": "Other", "credentials": "foobar"} |
|
|
|
|
|
|
|
|
|
|
|
def test_security_http_base_with_whitespaces(): |
|
|
|
response = client.get("/users/me", headers={"Authorization": "Other foobar "}) |
|
|
|
assert response.status_code == 200, response.text |
|
|
|
assert response.json() == {"scheme": "Other", "credentials": "foobar"} |
|
|
|
|
|
|
|
|
|
|
|
def test_security_http_base_no_credentials(): |
|
|
|
response = client.get("/users/me") |
|
|
|
assert response.status_code == 401, response.text |
|
|
|
|