Skip to content

test(aiohttp): Delete test which depends on AIOHTTP behavior #3568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2024
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
21 changes: 0 additions & 21 deletions tests/integrations/aiohttp/test_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,27 +605,6 @@ async def hello(request):
assert event["spans"][0]["origin"] == "auto.http.aiohttp"


@pytest.mark.asyncio
@pytest.mark.parametrize("invalid_response", (None, "invalid"))
async def test_invalid_response(
sentry_init, aiohttp_client, capture_events, invalid_response
):
sentry_init(integrations=[AioHttpIntegration()])

async def handler(_):
return invalid_response

app = web.Application()
app.router.add_get("/", handler)

client = await aiohttp_client(app)

# Invalid response should result on a ServerDisconnectedError in the client side, not an internal server error.
# Important to note that the ServerDisconnectedError indicates we have no error server-side.
with pytest.raises(ServerDisconnectedError):
await client.get("/")


@pytest.mark.parametrize(
("integration_kwargs", "exception_to_raise", "should_capture"),
(
Expand Down
Loading