Skip to content

Commit ccdbffb

Browse files
test(starlette): Remove invalid failed_request_status_code tests (getsentry#3560)
The Starlette integration tests (as well as the FastAPI integration tests, which hit the same code path as the Starlette integration) include a test where the integrations' `failed_request_status_codes` parameter is set to `[None]`. However, since the parameter is typed as `Optional[list[HttpStatusCodeRange]]`, where `HttpStatusCodeRange = Union[int, Container[int]]`, passing `[None]` for this parameter should not be allowed, per the type hint. Thus, we should not test this input, since the behavior of passing `[None]` is not, and should not be, defined by the API.
1 parent 5c6c778 commit ccdbffb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

tests/integrations/starlette/test_starlette.py

-1
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,6 @@ def test_span_origin(sentry_init, capture_events):
11491149
([range(400, 403), 500, 501], 405, False),
11501150
([range(400, 403), 500, 501], 501, True),
11511151
([range(400, 403), 500, 501], 503, False),
1152-
([None], 500, False),
11531152
],
11541153
)
11551154
"""Test cases for configurable status codes.

0 commit comments

Comments
 (0)