- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 92 for item_c (0.03 sec)
-
tests/test_tutorial/test_python_types/test_tutorial005.py
from docs_src.python_types.tutorial005_py39 import get_items def test_get_items(): res = get_items( "item_a", "item_b", "item_c", "item_d", "item_e", )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 271 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial006.py
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_schema_extra_examples.py
@app.get("/path_example/{item_id}") def path_example( item_id: str = Path( example="item_1", ), ): return item_id @app.get("/path_examples/{item_id}") def path_examples( item_id: str = Path( examples=["item_1", "item_2"], ), ): return item_idRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 32.2K bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial007.py
from docs_src.python_types.tutorial007_py39 import process_items def test_process_items(): items_t = (1, 2, "foo") items_s = {b"a", b"b", b"c"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 220 bytes - Viewed (0) -
tests/test_openapi_examples.py
"description": "Path One Description", "value": "item_1", }, "Path Two": { "value": "item_2", }, }, ), ): return item_id @app.get("/query_examples/") def query_examples( data: Union[str, None] = Query( default=None, examples=[ "json_schema_query1",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 15.1K bytes - Viewed (0) -
tests/test_tutorial/test_extra_models/test_tutorial003.py
def test_get_car(client: TestClient): response = client.get("/items/item1") assert response.status_code == 200, response.text assert response.json() == { "description": "All my friends drive a low rider", "type": "car", } def test_get_plane(client: TestClient): response = client.get("/items/item2") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_infer_param_optionality.py
if user_id is None: return [{"item_id": "i1", "user_id": "u1"}, {"item_id": "i2", "user_id": "u2"}] else: return [{"item_id": "i2", "user_id": user_id}] @item_router.get("/{item_id}") def get_item(item_id: str, user_id: Optional[str] = None): if user_id is None: return {"item_id": item_id} else: return {"item_id": item_id, "user_id": user_id}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.1K bytes - Viewed (0) -
tests/test_extra_routes.py
def delete_item(item_id: str, item: Item): return {"item_id": item_id, "item": item} @app.head("/items/{item_id}") def head_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.options("/items/{item_id}") def options_item(item_id: str): return JSONResponse(None, headers={"x-fastapi-item-id": item_id}) @app.patch("/items/{item_id}") def patch_item(item_id: str, item: Item):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 13.5K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py
response = client.get("/items/") assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} def test_query_params_str_validations_q_empty_str(client: TestClient): response = client.get("/items/", params={"q": ""}) assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py
response = client.get("/items/") assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} def test_query_params_str_validations_q_fixedquery(client: TestClient): response = client.get("/items/", params={"q": "fixedquery"}) assert response.status_code == 200 assert response.json() == { "items": [{"item_id": "Foo"}, {"item_id": "Bar"}],
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.9K bytes - Viewed (0)