Skip to content

Commit e3da71f

Browse files
committed
.
1 parent f5a5900 commit e3da71f

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

tests/integrations/fastapi/test_fastapi.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
FASTAPI_VERSION = parse_version(fastapi.__version__)
2121

2222
from tests.integrations.conftest import parametrize_test_configurable_status_codes
23-
from tests.integrations.starlette import test_starlette
2423

2524

2625
def fastapi_app_factory():
@@ -528,48 +527,6 @@ def test_transaction_name_in_middleware(
528527
)
529528

530529

531-
@test_starlette.parametrize_test_configurable_status_codes_deprecated
532-
def test_configurable_status_codes_deprecated(
533-
sentry_init,
534-
capture_events,
535-
failed_request_status_codes,
536-
status_code,
537-
expected_error,
538-
):
539-
with pytest.warns(DeprecationWarning):
540-
starlette_integration = StarletteIntegration(
541-
failed_request_status_codes=failed_request_status_codes
542-
)
543-
544-
with pytest.warns(DeprecationWarning):
545-
fast_api_integration = FastApiIntegration(
546-
failed_request_status_codes=failed_request_status_codes
547-
)
548-
549-
sentry_init(
550-
integrations=[
551-
starlette_integration,
552-
fast_api_integration,
553-
]
554-
)
555-
556-
events = capture_events()
557-
558-
app = FastAPI()
559-
560-
@app.get("/error")
561-
async def _error():
562-
raise HTTPException(status_code)
563-
564-
client = TestClient(app)
565-
client.get("/error")
566-
567-
if expected_error:
568-
assert len(events) == 1
569-
else:
570-
assert not events
571-
572-
573530
@pytest.mark.skipif(
574531
FASTAPI_VERSION < (0, 80),
575532
reason="Requires FastAPI >= 0.80, because earlier versions do not support HTTP 'HEAD' requests",

0 commit comments

Comments
 (0)