mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 12:45:19 +02:00
Send event when adding compute node or modify it (for server sumary)
This commit is contained in:
5 files changed
+29
-14
No files matched your search
@@ -76,9 +76,12 @@ def test_isEnabled(controller):
|
||||
|
||||
|
||||
def test_addCompute(controller, controller_config_path, async_run):
|
||||
async_run(controller.add_compute("test1"))
|
||||
controller._notification = MagicMock()
|
||||
c = async_run(controller.add_compute("test1"))
|
||||
controller._notification.emit.assert_called_with("compute.created", c.__json__())
|
||||
assert len(controller.computes) == 1
|
||||
async_run(controller.add_compute("test1"))
|
||||
controller._notification.emit.assert_called_with("compute.updated", c.__json__())
|
||||
assert len(controller.computes) == 1
|
||||
async_run(controller.add_compute("test2"))
|
||||
assert len(controller.computes) == 2
|
||||
|
||||
Reference in new issue
Block a user