Commit 674dfb00 authored by rajat29's avatar rajat29 Committed by Rajat Sharma

Use fixtures instead of deprecated mockpatch module

The mockpatch module of oslotest is deprecated since version 1.13
and may be removed in version 2.0. Use fixtures.Mock* classes instead.

Change-Id: I0ea834d41664efe84aa28ef2362467e2ad8b1928
parent 5cb6ad8c
......@@ -14,9 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import fixtures
from oslotest import base
from oslotest import mockpatch
class TestCase(base.BaseTestCase):
......@@ -24,5 +23,5 @@ class TestCase(base.BaseTestCase):
def patch(self, obj, attr):
"""Returns a Mocked object on the patched attribute."""
mockfixture = self.useFixture(mockpatch.PatchObject(obj, attr))
mockfixture = self.useFixture(fixtures.MockPatchObject(obj, attr))
return mockfixture.mock
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment