mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Better organisation of the API documentation
This commit is contained in:
1 parent
5170428913
commit
57348d0508
78 files changed
+788
-549
No files matched your search
@@ -260,21 +260,21 @@ def test_enable_l1_keepalives(loop, vm):
|
||||
assert command == ["test"]
|
||||
|
||||
|
||||
def test_start_capture(vm, tmpdir, manager, free_console_port):
|
||||
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": "192.168.1.2"})
|
||||
vm.adapter_add_nio_binding(0, 0, nio)
|
||||
vm.start_capture(0, 0, output_file)
|
||||
loop.run_until_complete(asyncio.async(vm.start_capture(0, 0, output_file)))
|
||||
assert vm._adapters[0].get_nio(0).capturing
|
||||
|
||||
|
||||
def test_stop_capture(vm, tmpdir, manager, free_console_port):
|
||||
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": "192.168.1.2"})
|
||||
vm.adapter_add_nio_binding(0, 0, nio)
|
||||
vm.start_capture(0, 0, output_file)
|
||||
loop.run_until_complete(vm.start_capture(0, 0, output_file))
|
||||
assert vm._adapters[0].get_nio(0).capturing
|
||||
vm.stop_capture(0, 0)
|
||||
loop.run_until_complete(asyncio.async(vm.stop_capture(0, 0)))
|
||||
assert vm._adapters[0].get_nio(0).capturing == False
|
||||
Reference in new issue
Block a user