mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 12:45:19 +02:00
Prevent capture on non running node
Fix https://github.com/GNS3/gns3-gui/issues/1656
This commit is contained in:
9 files changed
+158
-39
No files matched your search
@@ -474,3 +474,14 @@ def test_get_port(node):
|
||||
assert port.adapter_number == 1
|
||||
with pytest.raises(aiohttp.web.HTTPNotFound):
|
||||
port = node.get_port(42, 0)
|
||||
|
||||
|
||||
def test_parse_node_response(node, async_run):
|
||||
"""
|
||||
When a node is updated we notify the links connected to it
|
||||
"""
|
||||
link = MagicMock()
|
||||
link.node_updated = AsyncioMagicMock()
|
||||
node.add_link(link)
|
||||
async_run(node.parse_node_response({"status": "started"}))
|
||||
assert link.node_updated.called
|
||||
Reference in new issue
Block a user