Make power sync unit test operational

The ParallelPowerSyncTestCase did not inherit from unit test
therefore never actually run. This patch fixes this problem.

Change-Id: I8a6811485baa1219781b7083479af2d8811e4c67
This commit is contained in:
Ilya Etingof 2019-02-08 17:03:45 +01:00
parent e56f94acf8
commit 2dfb0650d0
1 changed files with 2 additions and 2 deletions

View File

@ -7148,7 +7148,7 @@ class ManagerTestHardwareTypeProperties(mgr_utils.ServiceSetUpMixin,
@mock.patch.object(waiters, 'wait_for_all')
@mock.patch.object(manager.ConductorManager, '_spawn_worker')
@mock.patch.object(manager.ConductorManager, '_sync_power_state_nodes_task')
class ParallelPowerSyncTestCase(mgr_utils.CommonMixIn):
class ParallelPowerSyncTestCase(mgr_utils.CommonMixIn, db_base.DbTestCase):
def setUp(self):
super(ParallelPowerSyncTestCase, self).setUp()
@ -7207,7 +7207,7 @@ class ParallelPowerSyncTestCase(mgr_utils.CommonMixIn):
self.service._sync_power_states(self.context)
self.assertEqual(0, spawn_mock.call_count)
self.assertEqual(9, sync_mock.call_count)
self.assertEqual(1, sync_mock.call_count)
self.assertEqual(1, waiter_mock.call_count)