Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for wrongpassword (0.04 sec)

  1. tests/test_tutorial/test_security/test_tutorial007.py

        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_password(client: TestClient):
        response = client.get("/users/me", auth=("stanleyjobson", "wrongpassword"))
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 3.2K bytes
    - Viewed (0)
Back to top