mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Replace asyncio.async with ensure_future because of deprecation, Fixes: #1269
This commit is contained in:
1 parent
838d82a98b
commit
d9a0ec9ff3
36 files changed
+192
-192
No files matched your search
@@ -356,7 +356,7 @@ def test_pcap(http_controller, tmpdir, project, compute, loop):
|
||||
project._links = {link.id: link}
|
||||
|
||||
future = asyncio.Future()
|
||||
asyncio.async(go(future))
|
||||
asyncio.ensure_future(go(future))
|
||||
response = loop.run_until_complete(future)
|
||||
assert response.status == 200
|
||||
assert b'hello' == response.body
|
||||
|
||||
@@ -140,7 +140,7 @@ def test_notification(http_controller, project, controller, loop, async_run):
|
||||
response.close()
|
||||
return response
|
||||
|
||||
response = async_run(asyncio.async(go()))
|
||||
response = async_run(asyncio.ensure_future(go()))
|
||||
assert response.status == 200
|
||||
assert b'"action": "ping"' in response.body
|
||||
assert b'"cpu_usage_percent"' in response.body
|
||||
|
||||
Reference in new issue
Block a user