Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_incorrect_token_type (0.21 sec)

  1. tests/test_tutorial/test_security/test_tutorial003_an_py310.py

        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Invalid authentication credentials"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    @needs_py310
    def test_incorrect_token_type(client: TestClient):
        response = client.get(
            "/users/me", headers={"Authorization": "Notexistent testtoken"}
        )
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.4K bytes
    - Viewed (0)
Back to top