- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for name (0.14 sec)
-
tests/test_tutorial/test_body/test_tutorial001.py
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"}) assert response.status_code == 200
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (4) -
tests/test_tutorial/test_body_fields/test_tutorial001.py
"components": { "schemas": { "Item": { "title": "Item", "required": ["name", "price"], "type": "object", "properties": { "name": {"title": "Name", "type": "string"}, "description": IsDict( {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 7.2K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py
def test_read_items(client: TestClient) -> None: response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [ { "name": "Portal Gun", "description": "Device to travel through the multi-rick-verse", }, {"name": "Plumbus", "description": None}, ] @needs_pydanticv2
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 4.8K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial001.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 7K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial001 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_extending_openapi/test_tutorial001.py
from docs_src.extending_openapi.tutorial001 import app client = TestClient(app) def test(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"name": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial001.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_extra_data_types/test_tutorial001.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 00:11:40 GMT 2024 - 6.8K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial001.py
def test_post_item(): response = client.post("/items/", json={"name": "Foo", "price": 3}) assert response.status_code == 200 assert response.json() == { "name": "Foo", "price": 3, "description": None, "tax": None, } def test_post_invalid_item(): response = client.post("/items/", json={"name": "Foo", "price": "invalid price"}) assert response.status_code == 422
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_async_sql_databases/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_pydanticv1 @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.async_sql_databases.tutorial001 import app yield app # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_create_read(app: FastAPI):
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 6K bytes - Viewed (0)