adapter_remove_nio_binding is a coroutine for all device type

It's cleaner
This commit is contained in:
Julien Duponchelle committed 2016-01-11 15:19:15 +01:00
1 parent 5a28b9409a
commit 758fb2a0e7
3 files changed
+6 -4

No files matched your search

+2 -2
View File
@@ -341,7 +341,7 @@ def test_start_capture(vm, tmpdir, manager, free_console_port, loop):
output_file = str(tmpdir / "test.pcap")
nio = manager.create_nio(vm.iouyap_path, {"type": "nio_udp", "lport": free_console_port, "rport": free_console_port, "rhost": "127.0.0.1"})
vm.adapter_add_nio_binding(0, 0, nio)
loop.run_until_complete(asyncio.async(vm.adapter_add_nio_binding(0, 0, nio)))
loop.run_until_complete(asyncio.async(vm.start_capture(0, 0, output_file)))
assert vm._adapters[0].get_nio(0).capturing
@@ -350,7 +350,7 @@ def test_stop_capture(vm, tmpdir, manager, free_console_port, loop):
output_file = str(tmpdir / "test.pcap")
nio = manager.create_nio(vm.iouyap_path, {"type": "nio_udp", "lport": free_console_port, "rport": free_console_port, "rhost": "127.0.0.1"})
vm.adapter_add_nio_binding(0, 0, nio)
loop.run_until_complete(asyncio.async(vm.adapter_add_nio_binding(0, 0, nio)))
loop.run_until_complete(vm.start_capture(0, 0, output_file))
assert vm._adapters[0].get_nio(0).capturing
loop.run_until_complete(asyncio.async(vm.stop_capture(0, 0)))