From 06f648659427e48e7d366fb610aa188382e9b53b Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Mon, 28 Nov 2016 13:18:25 +0700 Subject: [PATCH] Replace 'assertTrue(a in b)' with 'assertIn(a, b)' trivialfix Change-Id: Id756bb6698e2dfd68eac91cee8301e20054523c6 --- .../engine/executors/test_green_thread_executor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/karbor/tests/unit/operationengine/engine/executors/test_green_thread_executor.py b/karbor/tests/unit/operationengine/engine/executors/test_green_thread_executor.py index a9cacf0a..81eb9744 100644 --- a/karbor/tests/unit/operationengine/engine/executors/test_green_thread_executor.py +++ b/karbor/tests/unit/operationengine/engine/executors/test_green_thread_executor.py @@ -57,7 +57,7 @@ class GreenThreadExecutorTestCase(base.TestCase): window_time = 30 self._executor.execute_operation(self._op_id, now, now, window_time) - self.assertTrue(self._op_id in self._executor._operation_thread_map) + self.assertIn(self._op_id, self._executor._operation_thread_map) eventlet.sleep(1) @@ -77,7 +77,7 @@ class GreenThreadExecutorTestCase(base.TestCase): self._executor.resume_operation(self._op_id, end_time_for_run=( now + timedelta(seconds=window_time))) - self.assertTrue(self._op_id in self._executor._operation_thread_map) + self.assertIn(self._op_id, self._executor._operation_thread_map) eventlet.sleep(1) @@ -95,7 +95,7 @@ class GreenThreadExecutorTestCase(base.TestCase): window_time = 30 self._executor.execute_operation(self._op_id, now, now, window_time) - self.assertTrue(self._op_id in self._executor._operation_thread_map) + self.assertIn(self._op_id, self._executor._operation_thread_map) self._executor.cancel_operation(self._op_id)