- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for call_counts (0.07 sec)
-
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": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
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"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1006 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial006.py
from docs_src.python_types.tutorial006_py39 import process_items def test_process_items(): with patch("builtins.print") as mock_print: process_items(["item_a", "item_b", "item_c"]) assert mock_print.call_count == 3 call_args = [arg.args for arg in mock_print.call_args_list] assert call_args == [ ("item_a",), ("item_b",), ("item_c",),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 426 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial009_tutorial009b.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 805 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial008.py
from docs_src.python_types.tutorial008_py39 import process_items def test_process_items(): with patch("builtins.print") as mock_print: process_items({"a": 1.0, "b": 2.5}) assert mock_print.call_count == 4 call_args = [arg.args for arg in mock_print.call_args_list] assert call_args == [ ("a",), (1.0,), ("b",), (2.5,),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 417 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial008b.py
return mod def test_process_items(module: ModuleType): with patch("builtins.print") as mock_print: module.process_item("a") assert mock_print.call_count == 1
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 637 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial011.py
], ) def test_run_module(module_name: str): with patch("builtins.print") as mock_print: runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__") assert mock_print.call_count == 2 call_args = [str(arg.args[0]) for arg in mock_print.call_args_list] assert call_args == [ "id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]", "123",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 691 bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
public Object load(String key) throws InterruptedException { callCount.incrementAndGet(); startSignal.await(); return result; } }); List<Object> resultArray = doConcurrentGet(cache, "bar", count, startSignal); assertThat(callCount.get()).isEqualTo(1); for (int i = 0; i < count; i++) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 91.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheLoadingTest.java
public Object load(String key) throws InterruptedException { callCount.incrementAndGet(); startSignal.await(); return result; } }); List<Object> resultArray = doConcurrentGet(cache, "bar", count, startSignal); assertThat(callCount.get()).isEqualTo(1); for (int i = 0; i < count; i++) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 91.1K bytes - Viewed (0) -
src/test/java/jcifs/SmbWatchHandleTest.java
SmbWatchHandle realHandle = new SmbWatchHandle() { private int callCount = 0; @Override public List<FileNotifyInformation> watch() throws CIFSException { callCount++; if (callCount == 1) { return Arrays.asList(fileNotifyInfo1); } return Collections.emptyList();
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.2K bytes - Viewed (1)