diff options
author | rajat29 <rajat.sharma@nectechnologies.in> | 2017-08-22 12:12:15 +0530 |
---|---|---|
committer | rajat29 <rajat.sharma@nectechnologies.in> | 2017-08-22 12:13:18 +0530 |
commit | 20cae9b7fba62334872c28cbc244fe3b00a854c8 (patch) | |
tree | a0751b042bb9af0ceca562d5cf46bca50e268d2d | |
parent | 23ae4d96acf88ba06d0739bd47119e9d81b5a803 (diff) | |
download | python-heatclient-20cae9b7fba62334872c28cbc244fe3b00a854c8.tar.gz |
Using fixtures instead of deprecated mockpatch module
This module mockpatch of oslotest[1] is deprecated since version 1.13
and may be removed in version 2.0. Use fixtures.Mock* classes instead[2]
[1]OpenStack Testing Framework and Utilities
[2]https://docs.openstack.org/developer/oslotest/api/oslotest.mockpatch.html#module-oslotest.mockpatch
Change-Id: I6ab2f326cecb95fa7f9e6cbb01be1b2b498abdb1
-rw-r--r-- | heatclient/tests/unit/test_shell.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/heatclient/tests/unit/test_shell.py b/heatclient/tests/unit/test_shell.py index 57bd1ff..175eda1 100644 --- a/heatclient/tests/unit/test_shell.py +++ b/heatclient/tests/unit/test_shell.py @@ -22,7 +22,6 @@ import mock import mox from oslo_serialization import jsonutils from oslo_utils import encodeutils -from oslotest import mockpatch import requests from requests_mock.contrib import fixture as rm_fixture import six @@ -124,7 +123,7 @@ class TestCase(testtools.TestCase): # NOTE(tlashchova): this overrides the testtools.TestCase.patch method # that does simple monkey-patching in favor of mock's patching def patch(self, target, **kwargs): - mockfixture = self.useFixture(mockpatch.Patch(target, **kwargs)) + mockfixture = self.useFixture(fixtures.MockPatch(target, **kwargs)) return mockfixture.mock def stack_list_resp_dict(self, show_nested=False, include_project=False): |