Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tests/test_litestar_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from litestar import status_codes
from litestar.config.app import AppConfig
from litestar.middleware.logging import LoggingMiddlewareConfig
from litestar.params import FromPath
from litestar.testing import TestClient
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace import TracerProvider as SDKTracerProvider
Expand Down Expand Up @@ -134,7 +133,7 @@ def test_litestar_bootstrapper_with_missing_instrument_dependency(

def test_litestar_otel_span_naming(litestar_config: LitestarConfig) -> None:
@litestar.get("/items/{item_id:int}")
async def get_item(item_id: FromPath[int]) -> dict[str, int]:
async def get_item(item_id: int) -> dict[str, int]:
return {"item_id": item_id}

config = dataclasses.replace(litestar_config, application_config=AppConfig(route_handlers=[get_item]))
Expand Down Expand Up @@ -173,7 +172,7 @@ async def log_handler(request: litestar.Request) -> dict[str, str]:

def _scrape_prometheus_path_labels(config: LitestarConfig, handler_path: str, request_path: str) -> str:
@litestar.get(handler_path)
async def _handler(user_id: FromPath[int]) -> dict[str, int]:
async def _handler(user_id: int) -> dict[str, int]:
return {"user_id": user_id}

config = dataclasses.replace(config, application_config=AppConfig(route_handlers=[_handler]))
Expand Down
Loading