diff --git a/tests/golem/task/test_taskcomputeradapter.py b/tests/golem/task/test_taskcomputeradapter.py index 5558cc0152..85b62731d9 100644 --- a/tests/golem/task/test_taskcomputeradapter.py +++ b/tests/golem/task/test_taskcomputeradapter.py @@ -28,8 +28,8 @@ def setUp(self, new_task_computer, old_task_computer, int_stats_keeper): # noqa self.old_computer = old_task_computer() self.int_stats_keeper = int_stats_keeper() config_desc = ClientConfigDescriptor() - config_desc.accept_tasks = True - config_desc.in_shutdown = False + config_desc.accept_tasks = 1 + config_desc.in_shutdown = 0 self.task_keeper = mock.Mock() self.task_server = mock.Mock( spec=TaskServer, @@ -330,23 +330,23 @@ def _test_compute_tasks(self, accept_tasks, in_shutdown, expected): @defer.inlineCallbacks def test_compute_tasks_setting(self): yield self._test_compute_tasks( - accept_tasks=True, - in_shutdown=True, + accept_tasks=1, + in_shutdown=1, expected=False ) yield self._test_compute_tasks( - accept_tasks=True, - in_shutdown=False, + accept_tasks=1, + in_shutdown=0, expected=True ) yield self._test_compute_tasks( - accept_tasks=False, - in_shutdown=True, + accept_tasks=0, + in_shutdown=1, expected=False ) yield self._test_compute_tasks( - accept_tasks=False, - in_shutdown=False, + accept_tasks=0, + in_shutdown=0, expected=False ) diff --git a/tests/golem/test_client.py b/tests/golem/test_client.py index b81bdc60b9..9c7d73c39e 100644 --- a/tests/golem/test_client.py +++ b/tests/golem/test_client.py @@ -1123,7 +1123,7 @@ def test_provider_status_computing(self, *_): def test_provider_status_not_accepting_tasks(self, *_): # given - self.client.config_desc.accept_tasks = False + self.client.config_desc.accept_tasks = 0 # when status = self.client.get_provider_status() diff --git a/tests/golem/test_opt_node.py b/tests/golem/test_opt_node.py index 9377d86225..79de8018f1 100644 --- a/tests/golem/test_opt_node.py +++ b/tests/golem/test_opt_node.py @@ -842,7 +842,7 @@ def test_graceful_shutdown_quit(self, reactor, *_): @patch('golem.node.StatusPublisher') def test_graceful_shutdown_off(self, publisher, *_): - self.node_kwargs['config_desc'].in_shutdown = True + self.node_kwargs['config_desc'].in_shutdown = 1 self.node = Node(**self.node_kwargs) self.node.quit = Mock() @@ -851,8 +851,7 @@ def test_graceful_shutdown_off(self, publisher, *_): result = self.node.graceful_shutdown() assert result == ShutdownResponse.off - assert self.node.client.update_settings.called_with('in_shutdown', - False) + assert self.node.client.update_settings.called_with('in_shutdown', 0) assert self.node._is_task_in_progress.not_called assert self.node.quit.not_called publisher.publish.assert_called_with( @@ -867,8 +866,7 @@ def test_graceful_shutdown_on(self, publisher, *_): result = self.node.graceful_shutdown() assert result == ShutdownResponse.on - assert self.node.client.update_settings.called_with('in_shutdown', - True) + assert self.node.client.update_settings.called_with('in_shutdown', 1) assert self.node.quit.not_called assert self.node._is_task_in_progress.called publisher.publish.assert_called_with( @@ -886,7 +884,7 @@ def test_try_shutdown(self, *_): result = self.node.graceful_shutdown() assert result == ShutdownResponse.on - self.node._config_desc.in_shutdown = True + self.node._config_desc.in_shutdown = 1 self.node._is_task_in_progress = Mock(return_value=False) self.node._try_shutdown() assert self.node._is_task_in_progress.called