From 41fa1ac649e474ec7836f27f4037dcfcd7970a2b Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Tue, 21 Feb 2017 14:35:49 -0600 Subject: [PATCH] Stop using oslotest.mockpatch This module has been deprecated in favor of fixtures.MockPatch. Change-Id: Id60c1a35cc1ec832da1a459b19c43020987d0769 --- oslo_messaging/tests/drivers/test_impl_rabbit.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/oslo_messaging/tests/drivers/test_impl_rabbit.py b/oslo_messaging/tests/drivers/test_impl_rabbit.py index 6ab452e36..51f0c0c40 100644 --- a/oslo_messaging/tests/drivers/test_impl_rabbit.py +++ b/oslo_messaging/tests/drivers/test_impl_rabbit.py @@ -24,7 +24,6 @@ import kombu import kombu.transport.memory from oslo_config import cfg from oslo_serialization import jsonutils -from oslotest import mockpatch import testscenarios import oslo_messaging @@ -952,9 +951,9 @@ class RpcKombuHATestCase(test_utils.BaseTestCase): heartbeat_timeout_threshold=0, group="oslo_messaging_rabbit") - self.useFixture(mockpatch.Patch( + self.useFixture(fixtures.MockPatch( 'kombu.connection.Connection.connection')) - self.useFixture(mockpatch.Patch( + self.useFixture(fixtures.MockPatch( 'kombu.connection.Connection.channel')) # starting from the first broker in the list @@ -962,7 +961,7 @@ class RpcKombuHATestCase(test_utils.BaseTestCase): self.connection = rabbit_driver.Connection(self.conf, url, driver_common.PURPOSE_SEND) self.kombu_connect = mock.Mock() - self.useFixture(mockpatch.Patch( + self.useFixture(fixtures.MockPatch( 'kombu.connection.Connection.connect', side_effect=self.kombu_connect)) self.addCleanup(self.connection.close)