Replace class, APITestCase, with APIMockTestCase
The class, APITestCase, which uses mox, is being replaced with APIMockTestCase, which uses mock. The class, APITestCase, will be removed in the Stein release. Change-Id: I4e7ca740a47277a7cdac5ac9dcf0d048b53b13c9
This commit is contained in:
parent
87f1b5b658
commit
0c4b4f223a
@ -27,7 +27,7 @@ from muranodashboard.dynamic_ui import services
|
|||||||
from openstack_dashboard.test import helpers
|
from openstack_dashboard.test import helpers
|
||||||
|
|
||||||
|
|
||||||
class TestService(helpers.APITestCase):
|
class TestService(helpers.APIMockTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestService, self).setUp()
|
super(TestService, self).setUp()
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ from muranodashboard.environments import consts
|
|||||||
from openstack_dashboard.test import helpers
|
from openstack_dashboard.test import helpers
|
||||||
|
|
||||||
|
|
||||||
class TestEnvironmentsAPI(helpers.APITestCase):
|
class TestEnvironmentsAPI(helpers.APIMockTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestEnvironmentsAPI, self).setUp()
|
super(TestEnvironmentsAPI, self).setUp()
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ class TestEnvironmentsAPI(helpers.APITestCase):
|
|||||||
self.assertEqual([{'?': {'type': 'foo/bar'}}], result)
|
self.assertEqual([{'?': {'type': 'foo/bar'}}], result)
|
||||||
|
|
||||||
|
|
||||||
class TestEnvironmentsSessionAPI(helpers.APITestCase):
|
class TestEnvironmentsSessionAPI(helpers.APIMockTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestEnvironmentsSessionAPI, self).setUp()
|
super(TestEnvironmentsSessionAPI, self).setUp()
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ PARAM_MAPPING = {
|
|||||||
|
|
||||||
@mock.patch.object(environments, 'api')
|
@mock.patch.object(environments, 'api')
|
||||||
@mock.patch.object(environments, 'env_api')
|
@mock.patch.object(environments, 'env_api')
|
||||||
class TestComponentsMetadataAPI(helpers.APITestCase):
|
class TestComponentsMetadataAPI(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestComponentsMetadataAPI, self).setUp()
|
super(TestComponentsMetadataAPI, self).setUp()
|
||||||
@ -86,7 +86,7 @@ class TestComponentsMetadataAPI(helpers.APITestCase):
|
|||||||
|
|
||||||
@mock.patch.object(environments, 'api')
|
@mock.patch.object(environments, 'api')
|
||||||
@mock.patch.object(environments, 'env_api')
|
@mock.patch.object(environments, 'env_api')
|
||||||
class TestEnvironmentsMetadataApi(helpers.APITestCase):
|
class TestEnvironmentsMetadataApi(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestEnvironmentsMetadataApi, self).setUp()
|
super(TestEnvironmentsMetadataApi, self).setUp()
|
||||||
|
@ -21,7 +21,7 @@ from muranodashboard.environments import topology
|
|||||||
from openstack_dashboard.test import helpers
|
from openstack_dashboard.test import helpers
|
||||||
|
|
||||||
|
|
||||||
class TestTopology(helpers.APITestCase):
|
class TestTopology(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestTopology, self).setUp()
|
super(TestTopology, self).setUp()
|
||||||
|
@ -34,7 +34,7 @@ class MagicIterMock(mock.MagicMock):
|
|||||||
next = mock.Mock(return_value=None)
|
next = mock.Mock(return_value=None)
|
||||||
|
|
||||||
|
|
||||||
class TestPackagesAPI(helpers.APITestCase):
|
class TestPackagesAPI(helpers.APIMockTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestPackagesAPI, self).setUp()
|
super(TestPackagesAPI, self).setUp()
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ from muranodashboard.packages import forms
|
|||||||
from openstack_dashboard.test import helpers
|
from openstack_dashboard.test import helpers
|
||||||
|
|
||||||
|
|
||||||
class TestImportBundleForm(helpers.APITestCase):
|
class TestImportBundleForm(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def test_clean_form(self):
|
def test_clean_form(self):
|
||||||
import_bundle_form = forms.ImportBundleForm()
|
import_bundle_form = forms.ImportBundleForm()
|
||||||
@ -44,7 +44,7 @@ class TestImportBundleForm(helpers.APITestCase):
|
|||||||
import_bundle_form.clean()
|
import_bundle_form.clean()
|
||||||
|
|
||||||
|
|
||||||
class TestImportPackageForm(helpers.APITestCase):
|
class TestImportPackageForm(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestImportPackageForm, self).setUp()
|
super(TestImportPackageForm, self).setUp()
|
||||||
@ -105,7 +105,7 @@ class TestImportPackageForm(helpers.APITestCase):
|
|||||||
self.import_pkg_form.clean()
|
self.import_pkg_form.clean()
|
||||||
|
|
||||||
|
|
||||||
class TestUpdatePackageForm(helpers.APITestCase):
|
class TestUpdatePackageForm(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestUpdatePackageForm, self).setUp()
|
super(TestUpdatePackageForm, self).setUp()
|
||||||
@ -131,7 +131,7 @@ class TestUpdatePackageForm(helpers.APITestCase):
|
|||||||
self.update_pkg_form.fields['description'].initial)
|
self.update_pkg_form.fields['description'].initial)
|
||||||
|
|
||||||
|
|
||||||
class TestModifyPackageForm(helpers.APITestCase):
|
class TestModifyPackageForm(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestModifyPackageForm, self).setUp()
|
super(TestModifyPackageForm, self).setUp()
|
||||||
@ -256,7 +256,7 @@ class TestModifyPackageForm(helpers.APITestCase):
|
|||||||
redirect='test_redirect')
|
redirect='test_redirect')
|
||||||
|
|
||||||
|
|
||||||
class TestSelectCategories(helpers.APITestCase):
|
class TestSelectCategories(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestSelectCategories, self).setUp()
|
super(TestSelectCategories, self).setUp()
|
||||||
|
@ -23,7 +23,7 @@ from muranodashboard import api
|
|||||||
from openstack_dashboard.test import helpers
|
from openstack_dashboard.test import helpers
|
||||||
|
|
||||||
|
|
||||||
class TestApi(helpers.APITestCase):
|
class TestApi(helpers.APIMockTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestApi, self).setUp()
|
super(TestApi, self).setUp()
|
||||||
|
Loading…
Reference in New Issue
Block a user