- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,086 for itens (0.01 sec)
-
tests/test_forms_from_non_typing_sequences.py
app = FastAPI() @app.post("/form/python-list") def post_form_param_list(items: list = Form()): return items @app.post("/form/python-set") def post_form_param_set(items: set = Form()): return items @app.post("/form/python-tuple") def post_form_param_tuple(items: tuple = Form()): return items client = TestClient(app) def test_python_list_param_as_form():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 1.2K bytes - Viewed (0) -
tests/test_openapi_separate_input_output_schemas.py
app = FastAPI(separate_input_output_schemas=separate_input_output_schemas) @app.post("/items/", responses={402: {"model": Item}}) def create_item(item: Item) -> Item: return item @app.post("/items-list/") def create_item_list(item: list[Item]): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 26.6K bytes - Viewed (0) -
tests/test_starlette_exception.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001.py
def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200 assert response.json() == { "name": "Foo", "price": 50.5, "description": None, "tax": None, } def test_post_with_str_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": "50.5"})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial003.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_query(client: TestClient): response = client.get("/items/", params={"q": "query"}) 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 - 5.1K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an_py310.py
def test_override_in_items(): response = client.get("/items/") assert response.status_code == 200 assert response.json() == { "message": "Hello Items!", "params": {"q": None, "skip": 5, "limit": 10}, } def test_override_in_items_with_q(): response = client.get("/items/?q=foo") assert response.status_code == 200 assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
docs_src/dataclasses_/tutorial003_py310.py
@dataclass class Author: name: str items: list[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: list[Item]): # (5) return {"name": author_id, "items": items} # (6) @app.get("/authors/", response_model=list[Author]) # (7)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.3K bytes - Viewed (0) -
docs_src/dataclasses_/tutorial003_py39.py
@dataclass class Author: name: str items: list[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: list[Item]): # (5) return {"name": author_id, "items": items} # (6) @app.get("/authors/", response_model=list[Author]) # (7)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_additional_properties.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Items(BaseModel): items: dict[str, int] @app.post("/foo") def foo(items: Items): return items.items client = TestClient(app) def test_additional_properties_post(): response = client.post("/foo", json={"items": {"foo": 1, "bar": 2}}) assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial005.py
f"docs_src.path_params_numeric_validations.{request.param}" ) return TestClient(mod.app) @pytest.mark.parametrize( "path,expected_response", [ ("/items/1?q=", {"item_id": 1}), ("/items/1000?q=somequery", {"item_id": 1000, "q": "somequery"}), ], ) def test_read_items(client: TestClient, path, expected_response): response = client.get(path)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.6K bytes - Viewed (0)