- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for get_validlist (0.22 sec)
-
tests/test_serialize_response.py
@app.get("/items/coerce", response_model=Item) def get_coerce(): return {"name": "coerce", "price": "1.0"} @app.get("/items/validlist", response_model=List[Item]) def get_validlist(): return [ {"name": "foo"}, {"name": "bar", "price": 1.0}, {"name": "baz", "price": 2.0, "owner_ids": [1, 2, 3]}, ] client = TestClient(app) def test_valid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Aug 03 12:29:07 UTC 2020 - 1.4K bytes - Viewed (0) -
tests/test_serialize_response_model.py
@app.get("/items/validlist", response_model=List[Item]) def get_validlist(): return [ Item(aliased_name="foo"), Item(aliased_name="bar", price=1.0), Item(aliased_name="baz", price=2.0, owner_ids=[1, 2, 3]), ] @app.get("/items/validdict", response_model=Dict[str, Item]) def get_validdict(): return { "k1": Item(aliased_name="foo"),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 4.2K bytes - Viewed (0) -
tests/test_serialize_response_dataclass.py
@app.get("/items/coerce", response_model=Item) def get_coerce(): return {"name": "coerce", "date": datetime(2021, 7, 26).isoformat(), "price": "1.0"} @app.get("/items/validlist", response_model=List[Item]) def get_validlist(): return [ {"name": "foo", "date": datetime(2021, 7, 26)}, {"name": "bar", "date": datetime(2021, 7, 26), "price": 1.0}, { "name": "baz",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 26 13:56:47 UTC 2022 - 4.9K bytes - Viewed (0) -
tests/test_validate_response_dataclass.py
@app.get("/items/innerinvalid", response_model=Item) def get_innerinvalid(): return {"name": "double invalid", "price": "foo", "owner_ids": ["foo", "bar"]} @app.get("/items/invalidlist", response_model=List[Item]) def get_invalidlist(): return [ {"name": "foo"}, {"name": "bar", "price": "bar"}, {"name": "baz", "price": "baz"}, ] client = TestClient(app) def test_invalid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_validate_response.py
@app.get("/items/innerinvalid", response_model=Item) def get_innerinvalid(): return {"name": "double invalid", "price": "foo", "owner_ids": ["foo", "bar"]} @app.get("/items/invalidlist", response_model=List[Item]) def get_invalidlist(): return [ {"name": "foo"}, {"name": "bar", "price": "bar"}, {"name": "baz", "price": "baz"}, ] client = TestClient(app) def test_invalid():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0)