Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_override_security (0.14 sec)

  1. tests/test_dependency_security_overrides.py

        response = client.get("/user")
        assert response.json() == {
            "user": "john",
            "scopes": ["foo", "bar"],
            "data": [3, 4, 5],
        }
        app.dependency_overrides = {}
    
    
    def test_override_security():
        app.dependency_overrides[get_user] = get_user_override
        response = client.get("/user")
        assert response.json() == {
            "user": "alice",
            "scopes": ["foo", "bar"],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 14 15:54:46 UTC 2020
    - 1.4K bytes
    - Viewed (0)
Back to top