Remove mox in helpers.py
Replace mox with mock in helpers.py Change-Id: I277ecce0a2b1af0cbd0f1cd06403c2f318e254a4 Partially-Implements: blueprint remove-mox-ocata
This commit is contained in:
parent
63accc7987
commit
e5d939ad3d
6
magnum_ui/test/helpers.py
Normal file → Executable file
6
magnum_ui/test/helpers.py
Normal file → Executable file
@ -12,6 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import mock
|
||||||
|
|
||||||
from magnum_ui import api
|
from magnum_ui import api
|
||||||
from magnum_ui.test import test_data
|
from magnum_ui.test import test_data
|
||||||
from magnumclient.v1 import client as magnum_client
|
from magnumclient.v1 import client as magnum_client
|
||||||
@ -36,6 +38,6 @@ class APITestCase(helpers.APITestCase):
|
|||||||
|
|
||||||
def stub_magnumclient(self):
|
def stub_magnumclient(self):
|
||||||
if not hasattr(self, "magnumclient"):
|
if not hasattr(self, "magnumclient"):
|
||||||
self.mox.StubOutWithMock(magnum_client, 'Client')
|
magnum_client.Client = mock.Mock()
|
||||||
self.magnumclient = self.mox.CreateMock(magnum_client.Client)
|
self.magnumclient = magnum_client.Client
|
||||||
return self.magnumclient
|
return self.magnumclient
|
||||||
|
Loading…
x
Reference in New Issue
Block a user