Fix incorrect use of mock in scheduler test
Fix a scheduler manager test that mocks a manager method, calls the same method and then verifies it was called. Instead mock the driver method that is called by it and test that the manager method calls it. Change-Id: Ic349e443c143b27d1cc4456b667223f350de2325
This commit is contained in:
@@ -70,7 +70,7 @@ class SchedulerManagerTestCase(test.NoDBTestCase):
|
||||
method_name)
|
||||
|
||||
def test_select_destination(self):
|
||||
with mock.patch.object(self.manager, 'select_destinations'
|
||||
with mock.patch.object(self.manager.driver, 'select_destinations'
|
||||
) as select_destinations:
|
||||
self.manager.select_destinations(None, None, {})
|
||||
select_destinations.assert_called_once_with(None, None, {})
|
||||
|
||||
Reference in New Issue
Block a user