Skip to content

Commit ab67082

Browse files
committed
.
1 parent 9658ef5 commit ab67082

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

tests/integrations/starlette/test_starlette.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -387,37 +387,6 @@ async def test_starletterequestextractor_body_consumed_twice(
387387
await extractor.request.body()
388388

389389

390-
@pytest.mark.asyncio
391-
async def test_starletterequestextractor_extract_request_info_too_big(sentry_init):
392-
sentry_init(
393-
send_default_pii=True,
394-
integrations=[StarletteIntegration()],
395-
)
396-
scope = SCOPE.copy()
397-
scope["headers"] = [
398-
[b"content-type", b"multipart/form-data; boundary=fd721ef49ea403a6"],
399-
[b"content-length", str(len(BODY_FORM)).encode()],
400-
[b"cookie", b"yummy_cookie=choco; tasty_cookie=strawberry"],
401-
]
402-
starlette_request = starlette.requests.Request(scope)
403-
404-
# Mocking async `_receive()` that works in Python 3.7+
405-
side_effect = [_mock_receive(msg) for msg in FORM_RECEIVE_MESSAGES]
406-
starlette_request._receive = mock.Mock(side_effect=side_effect)
407-
408-
extractor = StarletteRequestExtractor(starlette_request)
409-
410-
request_info = await extractor.extract_request_info()
411-
412-
assert request_info
413-
assert request_info["cookies"] == {
414-
"tasty_cookie": "strawberry",
415-
"yummy_cookie": "choco",
416-
}
417-
# Because request is too big only the AnnotatedValue is extracted.
418-
assert request_info["data"].metadata == {"rem": [["!config", "x"]]}
419-
420-
421390
@pytest.mark.asyncio
422391
async def test_starletterequestextractor_extract_request_info(sentry_init):
423392
sentry_init(

0 commit comments

Comments
 (0)