Correctly process node.updated event on controller

This commit is contained in:
Julien Duponchelle committed 2016-05-18 16:12:57 +02:00
1 parent 694e1a2e68
commit fa0af7f4a2
9 files changed
+118 -33

No files matched your search

+2 -2
View File
@@ -152,7 +152,7 @@ def test_connectNotification(compute, async_run):
call += 1
if call == 1:
response = MagicMock()
response.data = '{"action": "test", "event": {"a": 1}, "project_id": "42"}'
response.data = '{"action": "test", "event": {"a": 1}}'
response.tp = aiohttp.MsgType.text
return response
else:
@@ -166,7 +166,7 @@ def test_connectNotification(compute, async_run):
ws_mock.receive = receive
async_run(compute._connect_notification())
compute._controller.notification.emit.assert_called_with('test', {'a': 1}, compute_id=compute.id, project_id='42')
compute._controller.notification.dispatch.assert_called_with('test', {'a': 1}, compute_id=compute.id)
assert compute._connected is False