Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions tests/test_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ def setUp(self):

def tearDown(self):
if self.communicator:
asyncio.get_event_loop().run_until_complete(
asyncio.new_event_loop().run_until_complete(
self.communicator.wait()
)

def seed_app(self, app):
self.communicator = ApplicationCommunicator(app, self.scope)

def send_input(self, payload):
asyncio.get_event_loop().run_until_complete(
asyncio.new_event_loop().run_until_complete(
self.communicator.send_input(payload)
)

def send_default_request(self):
self.send_input({"type": "http.request", "body": b""})

def get_output(self):
output = asyncio.get_event_loop().run_until_complete(
output = asyncio.new_event_loop().run_until_complete(
self.communicator.receive_output(0)
)
return output
Expand Down Expand Up @@ -229,6 +229,6 @@ def test_qs_parsing(self):

self.assert_not_metrics(output, *metrics[i_2])

asyncio.get_event_loop().run_until_complete(
asyncio.new_event_loop().run_until_complete(
self.communicator.wait()
)
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ deps =
pytest-benchmark
attrs
{py3.9,pypy3.9}: twisted
# NOTE: Pinned due to https://github.com/prometheus/client_python/issues/1020
py3.9: asgiref==3.7
pypy3.9: asgiref==3.7
commands = coverage run --parallel -m pytest {posargs}

[testenv:py3.9-nooptionals]
Expand Down