Pulls up _test_atomic_action_timer to TestCase

This method is being duplicated multiple times

Change-Id: I696d35f88fc94eccc3c351fc36db0cfb8add773c
This commit is contained in:
Yair Fried 2015-01-15 10:30:19 +02:00
parent 3e56558ea2
commit bc2c07e782

View File

@ -37,6 +37,11 @@ class TestCase(base.BaseTestCase):
super(TestCase, self).setUp() super(TestCase, self).setUp()
self.addCleanup(mock.patch.stopall) 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): class DBTestCase(TestCase):
"""Base class for tests which use DB.""" """Base class for tests which use DB."""