Merge "Mock time.sleep for test_lv_deactivate_timeout test"

This commit is contained in:
Jenkins 2016-09-20 22:29:12 +00:00 committed by Gerrit Code Review
commit beca2cc62c

View File

@ -373,7 +373,8 @@ class BrickLvmTestCase(base.TestCase):
self.vg.create_volume('test', '1G') self.vg.create_volume('test', '1G')
self.vg.deactivate_lv('test') self.vg.deactivate_lv('test')
def test_lv_deactivate_timeout(self): @mock.patch('time.sleep')
def test_lv_deactivate_timeout(self, mock_sleep):
with mock.patch.object(self.vg, '_execute'): with mock.patch.object(self.vg, '_execute'):
is_active_mock = mock.Mock() is_active_mock = mock.Mock()
is_active_mock.return_value = True is_active_mock.return_value = True