Send event when adding compute node or modify it (for server sumary)

This commit is contained in:
Julien Duponchelle committed 2016-05-23 18:44:20 +02:00
1 parent f6a3899603
commit 0aa81b5fa5
5 files changed
+29 -14

No files matched your search

+4 -1
View File
@@ -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