-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
aiohttp.test_utils.TestClient doesn't work with async with #2525
Comments
I'd like to send a PR but I am a little bit lost inside the code.
that is a and then wrapped inside a class _WSRequestContextManager(_BaseRequestContextManager):
@asyncio.coroutine
def __aexit__(self, exc_type, exc, tb):
yield from self._resp.close() Am I missing something? |
I suggest the following trick:
|
Supporting both |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
Testing websocket using a TestClient does not work as expected.
Expected behaviour
should work, where cli is aiohttp.test_utils.TestClient
Actual behaviour
Steps to reproduce
Use async with a TestClient.ws_connect
Your environment
Python 3.6.3
aiohttp 2.3.2
The text was updated successfully, but these errors were encountered: