Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for app_fixture (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_security_scopes.py

    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="call_counter")
    def call_counter_fixture():
        return {"count": 0}
    
    
    @pytest.fixture(name="app")
    def app_fixture(call_counter: dict[str, int]):
        def get_db():
            call_counter["count"] += 1
            return f"db_{call_counter['count']}"
    
        def get_user(db: Annotated[str, Depends(get_db)]):
            return "user"
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1006 bytes
    - Click Count (0)
Back to Top