From bc2c07e78259ba7dfed46d5d5f3a84f8068e2ed1 Mon Sep 17 00:00:00 2001 From: Yair Fried Date: Thu, 15 Jan 2015 10:30:19 +0200 Subject: [PATCH] Pulls up _test_atomic_action_timer to TestCase This method is being duplicated multiple times Change-Id: I696d35f88fc94eccc3c351fc36db0cfb8add773c --- tests/unit/test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit/test.py b/tests/unit/test.py index 5f5c4ccc..f7b055d1 100644 --- a/tests/unit/test.py +++ b/tests/unit/test.py @@ -37,6 +37,11 @@ class TestCase(base.BaseTestCase): super(TestCase, self).setUp() self.addCleanup(mock.patch.stopall) + def _test_atomic_action_timer(self, atomic_actions, name): + action_duration = atomic_actions.get(name) + self.assertIsNotNone(action_duration) + self.assertIsInstance(action_duration, float) + class DBTestCase(TestCase): """Base class for tests which use DB."""