- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 463 for cover (0.02 sec)
-
tests/test_tutorial/test_websockets/test_tutorial002.py
) # pragma: no cover def test_websocket_invalid_data(app: FastAPI): client = TestClient(app) with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/items/foo/ws?q=bar&token=some-token"): pytest.fail( "did not raise WebSocketDisconnect on __enter__"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_additional_responses_default_validationerror.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/a/{id}") async def a(id): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"},
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.8K bytes - Viewed (0) -
tests/test_stringified_annotation_dependency.py
from typing import TYPE_CHECKING, Annotated import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot if TYPE_CHECKING: # pragma: no cover from collections.abc import AsyncGenerator class DummyClient: async def get_people(self) -> list: return ["John Doe", "Jane Doe"] async def close(self) -> None: passRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.2K bytes - Viewed (0) -
tests/test_route_scope.py
def test_websocket_invalid_path_doesnt_match(): with pytest.raises(WebSocketDisconnect): with client.websocket_connect("/itemsx/portal-gun"):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Sep 29 03:29:38 UTC 2025 - 1.5K bytes - Viewed (0) -
tests/test_additional_responses_custom_validationerror.py
errors: list[Error] @app.get( "/a/{id}", response_class=JsonApiResponse, responses={422: {"description": "Error", "model": JsonApiError}}, ) async def a(id): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/DosErrorTest.java
assertNotNull(DosError.DOS_ERROR_MESSAGES, "DOS_ERROR_MESSAGES should be non‑null"); assertTrue(DosError.DOS_ERROR_MESSAGES.length >= DosError.DOS_ERROR_CODES.length, "DOS_ERROR_MESSAGES should cover all codes"); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3K bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_app01.py
def test_settings_validation_error(mod_name: str, monkeypatch: MonkeyPatch): monkeypatch.delenv("ADMIN_EMAIL", raising=False) if mod_name in sys.modules: del sys.modules[mod_name] # pragma: no cover with pytest.raises(ValidationError) as exc_info: importlib.import_module(mod_name) assert exc_info.value.errors() == [ { "loc": ("admin_email",),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
tests/test_tutorial/test_debugging/test_tutorial001.py
client = TestClient(mod.app) return client def test_uvicorn_run_is_not_called_on_import(): if sys.modules.get(MOD_NAME): del sys.modules[MOD_NAME] # pragma: no cover with unittest.mock.patch("uvicorn.run") as uvicorn_run_mock: importlib.import_module(MOD_NAME) uvicorn_run_mock.assert_not_called() def test_get_root(client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_params_repr.py
from typing import Any from fastapi.params import Body, Cookie, Header, Param, Path, Query test_data: list[Any] = ["teststr", None, ..., 1, []] def get_user(): return {} # pragma: no cover def test_param_repr_str(): assert repr(Param("teststr")) == "Param(teststr)" def test_param_repr_none(): assert repr(Param(None)) == "Param(None)" def test_param_repr_ellipsis():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 2.3K bytes - Viewed (0) -
tests/test_custom_middleware_exception.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Aug 25 21:44:40 UTC 2022 - 2.8K bytes - Viewed (0)