Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for call_counter (0.12 seconds)

  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 Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1006 bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/collect/AbstractHashFloodingTest.java

        return result;
      }
    
      public void testResistsHashFloodingInConstruction() {
        CallsCounter smallCounter = new CallsCounter();
        List<CountsHashCodeAndEquals> haveSameHashesSmall = createAdversarialInput(10, smallCounter);
        int smallSize = haveSameHashesSmall.size();
    
        CallsCounter largeCounter = new CallsCounter();
        List<CountsHashCodeAndEquals> haveSameHashesLarge = createAdversarialInput(15, largeCounter);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Apr 01 17:27:13 GMT 2026
    - 9K bytes
    - Click Count (0)
  3. tests/test_security_scopes_sub_dependency.py

    
    def test_security_scopes_sub_dependency_caching(
        client: TestClient, call_counts: dict[str, int]
    ):
        response = client.get("/")
    
        assert response.status_code == 200
        assert call_counts["get_db_session"] == 1
        assert call_counts["get_current_user"] == 2
        assert call_counts["get_user_me"] == 2
        assert call_counts["get_user_items"] == 1
        assert response.json() == {
            "user_me": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2.9K bytes
    - Click Count (0)
Back to Top