- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Husted (0.15 sec)
-
tests/test_tutorial/test_body_nested_models/test_tutorial009.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_nested_models.tutorial009 import app client = TestClient(app) return client def test_post_body(client: TestClient): data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 4.2K bytes - Viewed (0) -
tests/test_annotated.py
assert response.json() == {"foo": "baz"} def test_nested_router(): app = FastAPI() router = APIRouter(prefix="/nested") @router.get("/test") async def test(var: Annotated[str, Query()] = "bar"): return {"foo": var} app.include_router(router) client = TestClient(app) response = client.get("/nested/test") assert response.status_code == 200
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 10.2K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.body_nested_models.tutorial009_py39 import app client = TestClient(app) return client @needs_py39 def test_post_body(client: TestClient): data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 4.3K bytes - Viewed (0) -
fastapi/_compat.py
model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str], ) -> Dict[str, Any]: definitions: Dict[str, Dict[str, Any]] = {} for model in flat_models: m_schema, m_definitions, m_nested_models = model_process_schema( model, model_name_map=model_name_map, ref_prefix=REF_PREFIX ) definitions.update(m_definitions) model_name = model_name_map[model]
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 22.6K bytes - Viewed (0)