diff --git a/taskflow/tests/unit/test_engine_helpers.py b/taskflow/tests/unit/test_engine_helpers.py index ed40caa0..64be04b6 100644 --- a/taskflow/tests/unit/test_engine_helpers.py +++ b/taskflow/tests/unit/test_engine_helpers.py @@ -84,7 +84,7 @@ class FlowFromDetailTestCase(test.TestCase): with mock.patch('oslo_utils.importutils.import_class', return_value=lambda: 'RESULT') as mock_import: result = taskflow.engines.flow_from_detail(flow_detail) - mock_import.assert_called_onec_with(name) + mock_import.assert_called_once_with(name) self.assertEqual(result, 'RESULT') def test_factory_with_arg(self): @@ -95,7 +95,7 @@ class FlowFromDetailTestCase(test.TestCase): with mock.patch('oslo_utils.importutils.import_class', return_value=lambda x: 'RESULT %s' % x) as mock_import: result = taskflow.engines.flow_from_detail(flow_detail) - mock_import.assert_called_onec_with(name) + mock_import.assert_called_once_with(name) self.assertEqual(result, 'RESULT foo') diff --git a/taskflow/tests/unit/test_task.py b/taskflow/tests/unit/test_task.py index 2f6d4e97..30474af7 100644 --- a/taskflow/tests/unit/test_task.py +++ b/taskflow/tests/unit/test_task.py @@ -274,7 +274,7 @@ class TaskTest(test.TestCase): a_task = ProgressTask() a_task.notifier.register(task.EVENT_UPDATE_PROGRESS, progress_callback) a_task.execute([0.5]) - mocked_warn.assert_called_once() + self.assertEqual(1, mocked_warn.call_count) def test_register_handler_is_none(self): a_task = MyTask()