Switched from fixtures to mock to mock out starting RPC consumers

fixtures 2.0.0 broke us wildly, so instead of trying to make it work
with new fixtures, I better just switch the mock to... mock.

Change-Id: I58d7a750e263e4af54589ace07ac00bec34b553a
Closes-Bug: #1567295
This commit is contained in:
Ihar Hrachyshka 2016-04-07 19:15:01 +02:00
parent 3e26a7851e
commit 2af86b8f6f
1 changed files with 2 additions and 6 deletions

View File

@ -66,10 +66,6 @@ def fake_use_fatal_exceptions(*args):
return True
def fake_consume_in_threads(self):
return []
def get_related_rand_names(prefixes, max_length=None):
"""Returns a list of the prefixes with the same random characters appended
@ -343,9 +339,9 @@ class BaseTestCase(DietTestCase):
def setup_rpc_mocks(self):
# don't actually start RPC listeners when testing
self.useFixture(fixtures.MonkeyPatch(
mock.patch(
'neutron.common.rpc.Connection.consume_in_threads',
fake_consume_in_threads))
return_value=[]).start()
self.useFixture(fixtures.MonkeyPatch(
'oslo_messaging.Notifier', fake_notifier.FakeNotifier))