- Sort Score
- Result 10 results
- Languages All
Results 791 - 800 of 2,708 for most (0.03 sec)
-
tests/test_multi_body_errors.py
app = FastAPI() class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: List[Item]): return {"item": item} client = TestClient(app) def test_put_correct_body(): response = client.post("/items/", json=[{"name": "Foo", "age": 5}]) assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002_an.py
@needs_pydanticv2 def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_pydanticv2 def test_post_body_extra_form(client: TestClient): response = client.post( "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py
@needs_pydanticv1 def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_pydanticv1 def test_post_body_extra_form(client: TestClient): response = client.post( "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 6K bytes - Viewed (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/ToolchainsBuilder.java
* * @param session the {@link Session}, must not be {@code null} * @param installationToolchainsFile The {@link Source} pointing to the installation toolchains, must not be {@code null} * @param userToolchainsSource The {@link Source} pointing to the user toolchains, must not be {@code null} * @throws ToolchainsBuilderException if the project cannot be created
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Thu Aug 22 14:47:43 UTC 2024 - 2.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_03_an_py39.py
response = client.post("/files/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"file_size": 14} @needs_py39 def test_post_upload_file(tmp_path, client: TestClient): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") with path.open("rb") as file: response = client.post("/uploadfile/", files={"file": file})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 6.2K bytes - Viewed (0) -
cmd/endpoint-ellipses_test.go
{ []string{"http://host{0...5}/data{1...28}"}, []uint64{168}, [][]uint64{{12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}}, 12, true, }, // Incorrect custom set drive count. { []string{"http://host{0...5}/data{1...28}"}, []uint64{168}, nil, 10, false, }, // Failure not divisible number of disks. { []string{"http://host{1...11}/data{1...11}"},
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 15.2K bytes - Viewed (0) -
tests/test_forms_from_non_typing_sequences.py
from fastapi import FastAPI, Form from fastapi.testclient import TestClient app = FastAPI() @app.post("/form/python-list") def post_form_param_list(items: list = Form()): return items @app.post("/form/python-set") def post_form_param_set(items: set = Form()): return items @app.post("/form/python-tuple") def post_form_param_tuple(items: tuple = Form()): return items client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 1.2K bytes - Viewed (0) -
istioctl/pkg/multixds/google.go
import ( "fmt" "net/url" "strings" ) func isMCPAddr(u *url.URL) bool { return strings.HasSuffix(u.Host, ".googleapis.com") || strings.HasSuffix(u.Host, ".googleapis.com:443") } func parseMCPAddr(u *url.URL) (*xdsAddr, error) { ret := &xdsAddr{host: u.Host} if !strings.HasSuffix(ret.host, ":443") { ret.host += ":443" } const projSeg = "/projects/" i := strings.Index(u.Path, projSeg) if i == -1 {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Jun 06 03:39:27 UTC 2022 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PreemptiveAuth.java
private final String host; BasicAuthInterceptor(String host, String username, String password) { this.credentials = Credentials.basic(username, password); this.host = host; } @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); if (request.url().host().equals(host)) { request = request.newBuilder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Nov 05 07:46:46 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt
else -> "" } val effectiveHost = when { url.host.contains(":") -> "[" + url.host + "]" else -> url.host } assertThat(url.scheme, "scheme").isEqualTo(testData.scheme) assertThat(effectiveHost, "host").isEqualTo(testData.host) assertThat(effectivePort, "port").isEqualTo(testData.port) assertThat(url.encodedPath, "path").isEqualTo(testData.path)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.7K bytes - Viewed (0)