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:
howardlee 2016-11-30 21:45:28 +08:00
parent 63accc7987
commit e5d939ad3d

6
magnum_ui/test/helpers.py Normal file → Executable file
View File

@ -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