Stop get_notifier mock in tests cleanup
On our TestCase class we mock cinder.rpc.get_notifier and we start the
mock, but we never stop it on cleanup as we should.
This patch changes this behavior so that the mock is properly added to
the cleanup process.
TrivialFix
@@ -109,9 +109,8 @@ class TestCase(testtools.TestCase):
# Mock rpc get notifier with fake notifier method that joins all
# notifications with the default notifier
- p = mock.patch('cinder.rpc.get_notifier',
+ self.patch('cinder.rpc.get_notifier',
side_effect=self._get_joined_notifier)
- p.start()
if self.MOCK_WORKER:
# Mock worker creation for all tests that don't care about it
