diff options
| author | Joshua Harlow <harlowja@gmail.com> | 2015-01-23 00:41:58 -0800 |
|---|---|---|
| committer | Joshua Harlow <harlowja@gmail.com> | 2015-01-23 00:41:58 -0800 |
| commit | fc9cb88228204c37c43daaae799146fa1bb29213 (patch) | |
| tree | 1c1068d4f5e0f3bda09c2dcde8805eb0d1b5c32b /taskflow/tests/unit/worker_based | |
| parent | 292adc5a620f4318d8aa6f7580d66d1010076490 (diff) | |
| download | taskflow-fc9cb88228204c37c43daaae799146fa1bb29213.tar.gz | |
Use explicit WBE worker object arguments (instead of kwargs)
Removes the kwargs usage that is now uniform across the other
WBE components from the workers module so that the usage of
kwargs for setting up these objects no longer is valid.
Change-Id: I4e25b88c5d2f7e2d7933ff270e2782cebe227025
Diffstat (limited to 'taskflow/tests/unit/worker_based')
| -rw-r--r-- | taskflow/tests/unit/worker_based/test_worker.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/taskflow/tests/unit/worker_based/test_worker.py b/taskflow/tests/unit/worker_based/test_worker.py index a572beb..cc4578c 100644 --- a/taskflow/tests/unit/worker_based/test_worker.py +++ b/taskflow/tests/unit/worker_based/test_worker.py @@ -64,7 +64,11 @@ class TestWorker(test.MockTestCase): master_mock_calls = [ mock.call.executor_class(self.threads_count), mock.call.Server(self.topic, self.exchange, - self.executor_inst_mock, [], url=self.broker_url) + self.executor_inst_mock, [], + url=self.broker_url, + transport_options=mock.ANY, + transport=mock.ANY, + retry_options=mock.ANY) ] self.assertEqual(self.master_mock.mock_calls, master_mock_calls) @@ -83,20 +87,23 @@ class TestWorker(test.MockTestCase): mock.call.executor_class(10), mock.call.Server(self.topic, self.exchange, self.executor_inst_mock, [], - url=self.broker_url) + url=self.broker_url, + transport_options=mock.ANY, + transport=mock.ANY, + retry_options=mock.ANY) ] self.assertEqual(self.master_mock.mock_calls, master_mock_calls) - def test_creation_with_negative_threads_count(self): - self.assertRaises(ValueError, self.worker, threads_count=-10) - def test_creation_with_custom_executor(self): executor_mock = mock.MagicMock(name='executor') self.worker(executor=executor_mock) master_mock_calls = [ mock.call.Server(self.topic, self.exchange, executor_mock, [], - url=self.broker_url) + url=self.broker_url, + transport_options=mock.ANY, + transport=mock.ANY, + retry_options=mock.ANY) ] self.assertEqual(self.master_mock.mock_calls, master_mock_calls) |
