From e5d939ad3d3e32064f8d1f92840ef8d719c136ee Mon Sep 17 00:00:00 2001 From: howardlee Date: Wed, 30 Nov 2016 21:45:28 +0800 Subject: [PATCH] Remove mox in helpers.py Replace mox with mock in helpers.py Change-Id: I277ecce0a2b1af0cbd0f1cd06403c2f318e254a4 Partially-Implements: blueprint remove-mox-ocata --- magnum_ui/test/helpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 magnum_ui/test/helpers.py diff --git a/magnum_ui/test/helpers.py b/magnum_ui/test/helpers.py old mode 100644 new mode 100755 index 72b454a9..a1638ad8 --- a/magnum_ui/test/helpers.py +++ b/magnum_ui/test/helpers.py @@ -12,6 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +import mock + from magnum_ui import api from magnum_ui.test import test_data from magnumclient.v1 import client as magnum_client @@ -36,6 +38,6 @@ class APITestCase(helpers.APITestCase): def stub_magnumclient(self): if not hasattr(self, "magnumclient"): - self.mox.StubOutWithMock(magnum_client, 'Client') - self.magnumclient = self.mox.CreateMock(magnum_client.Client) + magnum_client.Client = mock.Mock() + self.magnumclient = magnum_client.Client return self.magnumclient