- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 1,839 for CLIENT (0.05 sec)
-
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
val mockServer: MockServerContainer = MockServerContainer(MOCKSERVER_IMAGE) .withNetworkAliases("mockserver") @Test fun testOkHttpDirect() { testRequest { val client = OkHttpClient() val response = client.newCall( Request((mockServer.endpoint + "/person?name=peter").toHttpUrl()), ).execute() assertThat(response.body.string()).contains("Peter the person")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 5.9K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial012_an_py39.py
from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.query_params_str_validations.tutorial012_an_py39 import app client = TestClient(app) return client @needs_py39 def test_default_query_values(client: TestClient): url = "/items/" response = client.get(url) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FastFallbackTest.kt
) serverIpv4.shutdown() serverIpv6.enqueue( MockResponse(body = "hello from IPv6"), ) client = client.newBuilder() .fastFallback(false) .callTimeout(1_000, TimeUnit.MILLISECONDS) .build() val call = client.newCall(Request(url)) assertFailsWith<IOException> { call.execute() }.also { expected ->
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial001_an_py310.py
], ) def test_get(path, expected_status, expected_response, client: TestClient): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_an_py39.py
@needs_py39 def test_get_root(app: FastAPI): client = TestClient(app) response = client.get("/") assert response.status_code == 200, response.text assert b"<form" in response.content @needs_py39 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009.py
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
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001_py310.py
from ...utils import needs_py310, needs_pydanticv2 @pytest.fixture(name="client") def get_client() -> TestClient: from docs_src.separate_openapi_schemas.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 4.9K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py
from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client() -> TestClient: from docs_src.separate_openapi_schemas.tutorial002 import app client = TestClient(app) return client def test_create_item(client: TestClient) -> None: response = client.post("/items/", json={"name": "Foo"}) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 4.8K bytes - Viewed (0) -
tests/test_security_http_digest.py
client = TestClient(app) def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Digest", "credentials": "foobar"} def test_security_http_digest_no_credentials(): response = client.get("/users/me")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer.py
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"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Non-existent testtoken"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0)