- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 203 for body (0.16 sec)
-
tests/test_union_body.py
} } }, }, }, "summary": "Save Union Body", "operationId": "save_union_body_items__post", "requestBody": { "content": { "application/json": { "schema": {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 4.6K bytes - Viewed (0) -
tests/test_multi_body_errors.py
app = FastAPI() class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: List[Item]): return {"item": item} client = TestClient(app) def test_put_correct_body(): response = client.post("/items/", json=[{"name": "Foo", "age": 5}]) assert response.status_code == 200, response.text assert response.json() == {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.6K bytes - Viewed (0) -
tests/test_regex_deprecated_body.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 6.2K bytes - Viewed (0) -
tests/test_put_no_body.py
app = FastAPI() @app.put("/items/{item_id}") def save_item_no_body(item_id: str): return {"item_id": item_id} client = TestClient(app) def test_put_no_body(): response = client.put("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item_id": "foo"} def test_put_no_body_with_body(): response = client.put("/items/foo", json={"name": "Foo"})
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_union_inherited_body.py
} }, }, }, "summary": "Save Union Different Body", "operationId": "save_union_different_body_items__post", "requestBody": { "content": { "application/json": { "schema": {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 5.2K bytes - Viewed (0) -
tests/test_request_body_parameters_media_type.py
async def create_product(data: Product = Body(media_type=media_type, embed=True)): pass # pragma: no cover @app.post("/shops") async def create_shop( data: Shop = Body(media_type=media_type), included: typing.List[Product] = Body(default=[], media_type=media_type), ): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 6.4K bytes - Viewed (0) -
tests/test_response_code_no_body.py
Sebastián RamÃrez <******@****.***> 1688149516 +0200
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.2K bytes - Viewed (0) -
tests/test_get_request_body.py
@app.get("/product") async def create_item(product: Product): return product client = TestClient(app) def test_get_with_body(): body = {"name": "Foo", "description": "Some description", "price": 5.5} response = client.request("GET", "/product", json=body) assert response.json() == body def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.7K bytes - Viewed (0) -
tests/test_params_repr.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.8K bytes - Viewed (0)