- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 869 for pos2 (0.5 sec)
-
tests/test_request_params/test_form/test_optional_list.py
# Without aliases @app.post("/optional-list-str", operation_id="optional_list_str") async def read_optional_list_str( p: Annotated[Optional[list[str]], Form()] = None, ): return {"p": p} class FormModelOptionalListStr(BaseModel): p: Optional[list[str]] = None @app.post("/model-optional-list-str", operation_id="model_optional_list_str")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.9K bytes - Viewed (0) -
tests/test_allow_inf_nan_in_enforcing.py
response = client.post(f"/?z={value}") assert response.status_code == code, response.text @pytest.mark.parametrize( "value,code", [ ("-1", 200), ("inf", 422), ("-inf", 422), ("nan", 422), ("0", 200), ("342", 200), ], ) def test_allow_inf_nan_body(value: str, code: int): response = client.post("/", json=value)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.8K bytes - Viewed (0) -
src/bytes/bytes_test.go
} b1[j] = 0 pos = IndexByte(b1, 'x') if pos != -1 { t.Errorf("IndexByte(%q, 'x') = %v", b1, pos) } } // different start and end alignments b1 = b[i/2 : n-(i+1)/2] for j := 0; j < len(b1); j++ { b1[j] = 'x' pos := IndexByte(b1, 'x') if pos != j { t.Errorf("IndexByte(%q, 'x') = %v", b1, pos) } b1[j] = 0 pos = IndexByte(b1, 'x')
Registered: Tue Dec 30 11:13:12 UTC 2025 - Last Modified: Tue Dec 23 23:54:14 UTC 2025 - 62.9K bytes - Viewed (0) -
tests/test_compat.py
def test_complex(): app = FastAPI() @app.post("/") def foo(foo: Union[str, list[int]]): return foo client = TestClient(app) response = client.post("/", json="bar") assert response.status_code == 200, response.text assert response.json() == "bar" response2 = client.post("/", json=[1, 2]) assert response2.status_code == 200, response2.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 4.2K bytes - Viewed (0) -
tests/test_dependency_duplicates.py
): return [item, sub_item] @app.post("/with-duplicates") async def with_duplicates(item: Item, item2: Item = Depends(duplicate_dependency)): return [item, item2] @app.post("/no-duplicates") async def no_duplicates(item: Item, item2: Item = Depends(dependency)): return [item, item2] @app.post("/with-duplicates-sub") async def no_duplicates_sub(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8K bytes - Viewed (0) -
tests/test_request_params/test_body/test_optional_list.py
# Without aliases @app.post("/optional-list-str", operation_id="optional_list_str") async def read_optional_list_str( p: Annotated[Optional[list[str]], Body(embed=True)] = None, ): return {"p": p} class BodyModelOptionalListStr(BaseModel): p: Optional[list[str]] = None @app.post("/model-optional-list-str", operation_id="model_optional_list_str")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 12.7K bytes - Viewed (0) -
.teamcity/scripts/update_wrapper_and_create_pr.sh
# If it's "Release - Release Candidate", version will be from version-info-release-candidate/version-info.properties post() { local endpoint="$1" local data="$2" local response=$(curl -X POST \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ -H "Content-Type: application/json" \
Registered: Wed Dec 31 11:36:14 UTC 2025 - Last Modified: Tue Jul 29 03:20:20 UTC 2025 - 2.9K bytes - Viewed (0) -
tests/test_forms_single_param.py
from fastapi import FastAPI, Form from fastapi.testclient import TestClient app = FastAPI() @app.post("/form/") def post_form(username: Annotated[str, Form()]): return username client = TestClient(app) def test_single_form_field(): response = client.post("/form/", data={"username": "Rick"}) assert response.status_code == 200, response.text assert response.json() == "Rick"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.5K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial007.py
} ], } ], } response = client.post( "/offers/", json=data, ) assert response.status_code == 200, response.text assert response.json() == data def test_put_only_required(client: TestClient): response = client.post( "/offers/", json={ "name": "Special Offer", "price": 38.6,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 10.8K bytes - Viewed (0) -
tests/test_request_params/test_body/test_required_str.py
# ===================================================================================== # Without aliases @app.post("/required-str", operation_id="required_str") async def read_required_str(p: Annotated[str, Body(embed=True)]): return {"p": p} class BodyModelRequiredStr(BaseModel): p: str @app.post("/model-required-str", operation_id="model_required_str") async def read_model_required_str(p: BodyModelRequiredStr):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 11K bytes - Viewed (0)