Skip to content

Fix AIOHTTP test failure #3567

Closed
Closed
@szokeasaurusrex

Description

@szokeasaurusrex

How do you use Sentry?

Sentry Saas (sentry.io)

Version

latest

Steps to Reproduce

Our Web Frameworks 2 latest tests are failing in master

Expected Result

They should pass

Actual Result

They don't:

=================================== FAILURES ===================================
_________________________ test_invalid_response[None] __________________________
tests/integrations/aiohttp/test_aiohttp.py:625: in test_invalid_response
    with pytest.raises(ServerDisconnectedError):
E   Failed: DID NOT RAISE <class 'aiohttp.client_exceptions.ServerDisconnectedError'>
------------------------------ Captured log call -------------------------------
ERROR    aiohttp.server:web_protocol.py:448 Missing return statement on request handler
Traceback (most recent call last):
  File "/home/runner/work/sentry-python/sentry-python/.tox/py3.12-aiohttp-latest/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 653, in finish_response
    prepare_meth = resp.prepare
                   ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'prepare'
________________________ test_invalid_response[invalid] ________________________
tests/integrations/aiohttp/test_aiohttp.py:625: in test_invalid_response
    with pytest.raises(ServerDisconnectedError):
E   Failed: DID NOT RAISE <class 'aiohttp.client_exceptions.ServerDisconnectedError'>
------------------------------ Captured log call -------------------------------
ERROR    aiohttp.server:web_protocol.py:448 Web-handler should return a response instance, got 'invalid'
Traceback (most recent call last):
  File "/home/runner/work/sentry-python/sentry-python/.tox/py3.12-aiohttp-latest/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 653, in finish_response
    prepare_meth = resp.prepare
                   ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'prepare'

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions