- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 277 for cover (0.02 seconds)
-
tests/test_pydantic_v1_error.py
def endpoint(data: ParamModelV1): # pragma: no cover return data def test_raises_pydantic_v1_model_in_return_type() -> None: class ReturnModelV1(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.get("/return") def endpoint() -> ReturnModelV1: # pragma: no cover return ReturnModelV1(name="test")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.3K bytes - Click Count (0) -
tests/test_invalid_sequence_param.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
fastapi/dependencies/models.py
from fastapi.types import DependencyCacheKey if sys.version_info >= (3, 13): # pragma: no cover from inspect import iscoroutinefunction else: # pragma: no cover from asyncio import iscoroutinefunction def _unwrapped_call(call: Callable[..., Any] | None) -> Any: if call is None: return call # pragma: no cover unwrapped = inspect.unwrap(_impartial(call)) return unwrapped
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:41:21 GMT 2026 - 7.1K bytes - Click Count (0) -
tests/test_openapi_cache_root_path.py
from fastapi import FastAPI from fastapi.testclient import TestClient def test_root_path_does_not_persist_across_requests(): app = FastAPI() @app.get("/") def read_root(): # pragma: no cover return {"ok": True} # Attacker request with a spoofed root_path attacker_client = TestClient(app, root_path="/evil-api") response1 = attacker_client.get("/openapi.json") data1 = response1.json()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 24 09:28:10 GMT 2026 - 2.3K bytes - Click Count (0) -
fastapi/_compat/shared.py
) -> TypeGuard[type[_T]]: try: return isinstance(cls, type) and issubclass(cls, class_or_tuple) # type: ignore[arg-type] except TypeError: # pragma: no cover if isinstance(cls, WithArgsTypes): return False raise # pragma: no cover def _annotation_is_sequence(annotation: type[Any] | None) -> bool: if lenient_issubclass(annotation, (str, bytes)): return False
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:32:12 GMT 2026 - 6.9K bytes - Click Count (0) -
tests/test_additional_responses_custom_model_in_callback.py
@callback_router.get( "{$callback_url}/callback/", responses={400: {"model": CustomModel}} ) def callback_route(): pass # pragma: no cover @app.post("/", callbacks=callback_router.routes) def main_route(callback_url: HttpUrl): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 14:34:02 GMT 2026 - 5.9K bytes - Click Count (0) -
tests/test_request_body_parameters_media_type.py
@app.post("/products") async def create_product(data: Product = Body(media_type=media_type, embed=True)): pass # pragma: no cover @app.post("/shops") async def create_shop( data: Shop = Body(media_type=media_type), included: list[Product] = Body(default=[], media_type=media_type), ): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 7.2K bytes - Click Count (0) -
.teamcity/src/main/kotlin/model/CIBuildModel.kt
QUICK(true, true, true, 120, 4), // Include cross version tests, these take care of selecting a very small set of versions to cover when run as part of this stage, including the current version PLATFORM(true, true, true), // Cross version tests select a small set of versions to cover when run as part of this stage
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Tue Jan 20 03:53:25 GMT 2026 - 27.5K bytes - Click Count (0) -
fastapi/middleware/wsgi.py
from starlette.middleware.wsgi import ( WSGIMiddleware as WSGIMiddleware,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 11:54:23 GMT 2026 - 107 bytes - Click Count (0) -
tests/test_tutorial/test_background_tasks/test_tutorial001.py
from tests.utils import workdir_lock client = TestClient(app) @workdir_lock def test(): log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***") assert response.status_code == 200, response.text assert response.json() == {"message": "Notification sent in the background"}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 10:53:47 GMT 2026 - 635 bytes - Click Count (0)