mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 22:41:12 +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
@@ -83,7 +83,7 @@ def test_close(node, loop, port_manager):
|
||||
|
||||
node.aux = aux
|
||||
port = node.console
|
||||
assert loop.run_until_complete(asyncio.async(node.close()))
|
||||
assert loop.run_until_complete(asyncio.ensure_future(node.close()))
|
||||
# Raise an exception if the port is not free
|
||||
port_manager.reserve_tcp_port(port, node.project)
|
||||
# Raise an exception if the port is not free
|
||||
@@ -92,7 +92,7 @@ def test_close(node, loop, port_manager):
|
||||
assert node.aux is None
|
||||
|
||||
# Called twice closed should return False
|
||||
assert loop.run_until_complete(asyncio.async(node.close())) is False
|
||||
assert loop.run_until_complete(asyncio.ensure_future(node.close())) is False
|
||||
|
||||
|
||||
def test_aux(project, manager, port_manager):
|
||||
|
||||
Reference in new issue
Block a user