8561: delete redundant "maxDiff = None"
[arvados.git] / services / nodemanager / tests / test_daemon.py
index f41fa6cb1af57b6b1cb005a09bec95207ace0b14..2daca08ecf7eb114173725bb88deff2969ad5bf3 100644 (file)
@@ -26,6 +26,7 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
                                           cloud_size=get_cloud_size,
                                           actor_ref=mock_actor)
         mock_actor.proxy.return_value = mock_proxy
+        mock_actor.tell_proxy.return_value = mock_proxy
 
         self.last_setup = mock_proxy
         return mock_actor
@@ -58,6 +59,7 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
         self.cloud_factory().node_start_time.return_value = time.time()
         self.cloud_updates = mock.MagicMock(name='updates_mock')
         self.timer = testutil.MockTimer(deliver_immediately=False)
+        self.cloud_factory().node_id.side_effect = lambda node: node.id
 
         self.node_setup = mock.MagicMock(name='setup_mock')
         self.node_setup.start.side_effect = self.mock_node_start
@@ -122,7 +124,7 @@ class NodeManagerDaemonActorTestCase(testutil.ActorTestMixin,
     def test_node_pairing_after_arvados_update(self):
         cloud_node = testutil.cloud_node_mock(2)
         self.make_daemon([cloud_node],
-                         [testutil.arvados_node_mock(2, ip_address=None)])
+                         [testutil.arvados_node_mock(1, ip_address=None)])
         arv_node = testutil.arvados_node_mock(2)
         self.daemon.update_arvados_nodes([arv_node]).get(self.TIMEOUT)
         self.stop_proxy(self.daemon)