- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 148 for parameterize (0.63 sec)
-
tests/test_tutorial/test_response_model/test_tutorial003_04.py
import importlib import pytest from fastapi.exceptions import FastAPIError from ...utils import needs_py310 @pytest.mark.parametrize( "module_name", [ pytest.param("tutorial003_04_py39"), pytest.param("tutorial003_04_py310", marks=needs_py310), ], ) def test_invalid_response_model(module_name: str) -> None: with pytest.raises(FastAPIError):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 453 bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from docs_src.path_params.tutorial001_py39 import app client = TestClient(app) @pytest.mark.parametrize( ("item_id", "expected_response"), [ (1, {"item_id": "1"}), ("alice", {"item_id": "alice"}), ], ) def test_get_items(item_id, expected_response): response = client.get(f"/items/{item_id}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial011.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dependencies.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "path,expected_status,expected_response", [ ( "/query-checker/", 200, {"fixed_content_in_query": False}, ), (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py
import pytest from fastapi.testclient import TestClient from docs_src.path_operation_configuration.tutorial006_py39 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/items/", 200, [{"name": "Foo", "price": 42}]), ("/users/", 200, [{"username": "johndoe"}]), ("/elements/", 200, [{"item_id": "Foo"}]), ], )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.4K bytes - Viewed (0) -
src/main/java/org/codelibs/core/beans/impl/MethodDescImpl.java
/** The return type of the method */ protected final Class<?> returnType; /** Information about parameterized argument types */ protected final ParameterizedClassDesc[] parameterizedClassDescs; /** Information about the parameterized return type */ protected final ParameterizedClassDesc parameterizedClassDesc; /** * Constructs an instance. *Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 7.3K bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial011.py
import runpy from unittest.mock import patch import pytest from ...utils import needs_py310 @pytest.mark.parametrize( "module_name", [ pytest.param("tutorial011_py39"), pytest.param("tutorial011_py310", marks=needs_py310), ], ) 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__")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 691 bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001.py
], ) def get_mod(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.cookie_params.{request.param}") return mod @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.header_params.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.header_params.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"strange_header": None}), ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}), (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.header_params.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"X-Token values": None}), ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}), (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.1K bytes - Viewed (0)