- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 1,086 for itens (0.01 sec)
-
tests/test_tutorial/test_query_params_str_validations/test_tutorial006c.py
def test_query_params_str_validations_empty_str(client: TestClient): response = client.get("/items/?q=") assert response.status_code == 200 assert response.json() == { # pragma: no cover "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
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5K bytes - Viewed (0) -
tests/test_tutorial/test_generate_clients/test_tutorial002.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.1K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
tokenUrl="token", description="OAuth2 Code Bearer", auto_error=True, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token", auto_error=False) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs_src/body_updates/tutorial001_py310.py
tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2}, "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []}, } @app.get("/items/{item_id}", response_model=Item) async def read_item(item_id: str): return items[item_id]Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 856 bytes - Viewed (0) -
docs/zh/docs/tutorial/bigger-applications.md
/// ## 其他使用 `APIRouter` 的模块 假设你在位于 `app/routers/items.py` 的模块中还有专门用于处理应用程序中「项目」的端点。 你具有以下*路径操作*: * `/items/` * `/items/{item_id}` 这和 `app/routers/users.py` 的结构完全相同。 但是我们想变得更聪明并简化一些代码。 我们知道此模块中的所有*路径操作*都有相同的: * 路径 `prefix`:`/items`。 * `tags`:(仅有一个 `items` 标签)。 * 额外的 `responses`。 * `dependencies`:它们都需要我们创建的 `X-Token` 依赖项。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun May 11 13:37:26 UTC 2025 - 18.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial001_tutorial001_01.py
"items": {"$ref": "#/components/schemas/Item"}, "title": "Response Read Items Items Get", } } }, }, }, "summary": "Read Items", "operationId": "read_items_items__get",Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.5K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_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.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004.py
return client @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), ( "/items/bar", {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2}, ), ( "/items/baz", { "name": "Baz", "description": None,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.3K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/suggest/request/suggest/SuggestResponseTest.java
List<SuggestItem> items = new ArrayList<>(); String[][] readings = new String[1][]; readings[0] = new String[] { "test" }; items.add(new SuggestItem(new String[] { "test" }, readings, new String[] { "content" }, 1, 0, -1, new String[] { "tag1" }, new String[] { SuggestConstants.DEFAULT_ROLE }, null, SuggestItem.Kind.DOCUMENT));Registered: Sat Dec 20 13:04:59 UTC 2025 - Last Modified: Mon Nov 24 03:40:05 UTC 2025 - 6.4K bytes - Viewed (0)