Skip to content

Commit

Permalink
test(starlette): Remove invalid failed_request_status_code tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
szokeasaurusrex committed Sep 24, 2024
1 parent ee3ca40 commit 2afe13a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/integrations/starlette/test_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,6 @@ def test_span_origin(sentry_init, capture_events):
([range(400, 403), 500, 501], 405, False),
([range(400, 403), 500, 501], 501, True),
([range(400, 403), 500, 501], 503, False),
([None], 500, False),
],
)
"""Test cases for configurable status codes.
Expand Down

0 comments on commit 2afe13a

Please # to comment.