- Sort Score
- Result 10 results
- Languages All
Results 491 - 500 of 526 for RestClient (0.09 sec)
-
docs/de/docs/advanced/testing-events.md
# Events testen: Hochfahren – Herunterfahren Wenn Sie in Ihren Tests Ihre Event-Handler (`startup` und `shutdown`) ausführen wollen, können Sie den `TestClient` mit einer `with`-Anweisung verwenden: ```Python hl_lines="9-12 20-24" {!../../docs_src/app_testing/tutorial003.py!}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 288 bytes - Viewed (0) -
docs/pt/docs/advanced/testing-events.md
# Testando Eventos: inicialização - encerramento Quando você precisa que os seus manipuladores de eventos (`startup` e `shutdown`) sejam executados em seus testes, você pode utilizar o `TestClient` usando a instrução `with`: ```Python hl_lines="9-12 20-24" {!../../docs_src/app_testing/tutorial003.py!}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 316 bytes - Viewed (0) -
mockwebserver-junit5/src/test/java/mockwebserver3/junit5/internal/ExtensionMultipleInstancesTest.kt
) { assertThat(defaultInstance.port).isEqualTo(defaultInstancePort) assertThat(instanceA.port).isEqualTo(instanceAPort) assertThat(instanceB.port).isEqualTo(instanceBPort) } @Test fun testClient( defaultInstance: MockWebServer, @MockWebServerInstance("A") instanceA: MockWebServer, @MockWebServerInstance("B") instanceB: MockWebServer, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 2.3K bytes - Viewed (0) -
mockwebserver-junit5/src/test/java/mockwebserver3/junit5/internal/ExtensionLifecycleTest.kt
server.enqueue(MockResponse()) } @AfterEach fun afterEach(server: MockWebServer) { assertThat(server).isSameInstanceAs(instanceServer) } @Test fun testClient(server: MockWebServer) { assertThat(server).isSameInstanceAs(instanceServer) clientTestRule.newClient().newCall(Request(server.url("/"))).execute().use { assertThat(it.code).isEqualTo(200) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 11 12:12:36 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_application.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from .main import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/api_route", 200, {"message": "Hello World"}), ("/non_decorated_route", 200, {"message": "Hello World"}), ("/nonexistent", 404, {"detail": "Not Found"}), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 52.2K bytes - Viewed (0) -
tests/test_path.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from .main import app client = TestClient(app) def test_text_get(): response = client.get("/text") assert response.status_code == 200, response.text assert response.json() == "Hello World" def test_nonexistent(): response = client.get("/nonexistent") assert response.status_code == 404, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 34.4K bytes - Viewed (0) -
tests/test_response_model_as_return_annotation.py
from typing import List, Union import pytest from fastapi import FastAPI from fastapi.exceptions import FastAPIError, ResponseValidationError from fastapi.responses import JSONResponse, Response from fastapi.testclient import TestClient from pydantic import BaseModel class BaseUser(BaseModel): name: str class User(BaseUser): surname: str class DBUser(User): password_hash: str
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Aug 14 09:49:57 UTC 2023 - 47.7K bytes - Viewed (0) -
docs/en/mkdocs.yml
- reference/openapi/docs.md - reference/openapi/models.md - reference/security/index.md - reference/encoders.md - reference/staticfiles.md - reference/templating.md - reference/testclient.md - fastapi-people.md - Resources: - resources/index.md - help-fastapi.md - contributing.md - project-generation.md - external-links.md - newsletter.md - management-tasks.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 22 20:28:02 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/de/docs/features.md
* **WebSocket**-Unterstützung. * Hintergrundaufgaben im selben Prozess. * Ereignisse beim Starten und Herunterfahren. * Testclient baut auf HTTPX auf. * **CORS**, GZip, statische Dateien, Responses streamen. * **Sitzungs- und Cookie**-Unterstützung. * 100 % Testabdeckung. * 100 % Typen annotierte Codebasis. ## Pydantic's Merkmale
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 23:30:12 UTC 2024 - 10.7K bytes - Viewed (0) -
docs/uk/docs/index.md
Starlette використовує: * <a href="https://www.python-httpx.org" target="_blank"><code>httpx</code></a> - Необхідно, якщо Ви хочете використовувати `TestClient`. * <a href="https://jinja.palletsprojects.com" target="_blank"><code>jinja2</code></a> - Необхідно, якщо Ви хочете використовувати шаблони як конфігурацію за замовчуванням.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 24.2K bytes - Viewed (0)