Clean up usage of APIMockTestCase

In Stein development version of horizon, APITestCase and APIMockTestCase
are identical, and APIMockTestCase will be dropped in future.
murano-dashboard is the only consumer of APIMockTestCase now.
This commit clean up the usage of APIMockTestCase.

horizon stein depends on osprofiler>=2.3.0, so lower-constraints.txt
file is updated accordingly.

Change-Id: I36cb8ade8ec80cd313dc9be9e1f1a67daeb60c87
This commit is contained in:
Akihiro Motoki 2019-01-31 21:49:43 +09:00
parent d123d1aca2
commit 98ef69ab2c
12 changed files with 25 additions and 25 deletions

View File

@ -32,7 +32,7 @@ fixtures==3.0.0
flake8==2.5.5
futurist==1.6.0
hacking==0.12.0
horizon==14.0.0.0b3
horizon==15.0.0.0b1
idna==2.6
imagesize==1.0.0
iso8601==0.1.11
@ -66,7 +66,7 @@ oslo.log==3.36.0
oslo.policy==1.34.0
oslo.serialization==2.25.0
oslo.utils==3.36.0
osprofiler==2.0.0
osprofiler==2.3.0
packaging==17.1
pbr==2.0.0
pep8==1.5.7

View File

@ -29,7 +29,7 @@ class FlavorFlave(object):
self.id = id
class TestFlavorField(helpers.APIMockTestCase):
class TestFlavorField(helpers.APITestCase):
@mock.patch('muranodashboard.dynamic_ui.fields.nova')
def test_no_filter(self, mock_nova):

View File

@ -18,7 +18,7 @@ from muranodashboard.catalog import tabs
from openstack_dashboard.test import helpers
class TestLicenseTab(helpers.APIMockTestCase):
class TestLicenseTab(helpers.APITestCase):
@mock.patch('muranodashboard.catalog.tabs.services')
def test_license(self, mock_services):
"""Check that a license is returned."""
@ -66,7 +66,7 @@ class TestLicenseTab(helpers.APIMockTestCase):
self.assertEqual('', l.app.license)
class TestRequirementsTab(helpers.APIMockTestCase):
class TestRequirementsTab(helpers.APITestCase):
@mock.patch('muranodashboard.catalog.tabs.services')
def test_requirements(self, mock_services):
"""Check that requirements are returned."""

View File

@ -27,7 +27,7 @@ from muranodashboard.dynamic_ui import services
from openstack_dashboard.test import helpers
class TestService(helpers.APIMockTestCase):
class TestService(helpers.APITestCase):
def setUp(self):
super(TestService, self).setUp()

View File

@ -22,7 +22,7 @@ from muranodashboard.environments import consts
from openstack_dashboard.test import helpers
class TestEnvironmentsAPI(helpers.APIMockTestCase):
class TestEnvironmentsAPI(helpers.APITestCase):
def setUp(self):
super(TestEnvironmentsAPI, self).setUp()
@ -349,7 +349,7 @@ class TestEnvironmentsAPI(helpers.APIMockTestCase):
self.assertEqual([{'?': {'type': 'foo/bar'}}], result)
class TestEnvironmentsSessionAPI(helpers.APIMockTestCase):
class TestEnvironmentsSessionAPI(helpers.APITestCase):
def setUp(self):
super(TestEnvironmentsSessionAPI, self).setUp()

View File

@ -28,7 +28,7 @@ PARAM_MAPPING = {
@mock.patch.object(environments, 'api')
@mock.patch.object(environments, 'env_api')
class TestComponentsMetadataAPI(helpers.APIMockTestCase):
class TestComponentsMetadataAPI(helpers.APITestCase):
def setUp(self):
super(TestComponentsMetadataAPI, self).setUp()
@ -86,7 +86,7 @@ class TestComponentsMetadataAPI(helpers.APIMockTestCase):
@mock.patch.object(environments, 'api')
@mock.patch.object(environments, 'env_api')
class TestEnvironmentsMetadataApi(helpers.APIMockTestCase):
class TestEnvironmentsMetadataApi(helpers.APITestCase):
def setUp(self):
super(TestEnvironmentsMetadataApi, self).setUp()

View File

@ -21,7 +21,7 @@ from muranodashboard.environments import topology
from openstack_dashboard.test import helpers
class TestTopology(helpers.APIMockTestCase):
class TestTopology(helpers.APITestCase):
def setUp(self):
super(TestTopology, self).setUp()

View File

@ -34,7 +34,7 @@ class MagicIterMock(mock.MagicMock):
next = mock.Mock(return_value=None)
class TestPackagesAPI(helpers.APIMockTestCase):
class TestPackagesAPI(helpers.APITestCase):
def setUp(self):
super(TestPackagesAPI, self).setUp()

View File

@ -22,7 +22,7 @@ from muranodashboard.packages import forms
from openstack_dashboard.test import helpers
class TestImportBundleForm(helpers.APIMockTestCase):
class TestImportBundleForm(helpers.APITestCase):
def test_clean_form(self):
import_bundle_form = forms.ImportBundleForm()
@ -44,7 +44,7 @@ class TestImportBundleForm(helpers.APIMockTestCase):
import_bundle_form.clean()
class TestImportPackageForm(helpers.APIMockTestCase):
class TestImportPackageForm(helpers.APITestCase):
def setUp(self):
super(TestImportPackageForm, self).setUp()
@ -105,7 +105,7 @@ class TestImportPackageForm(helpers.APIMockTestCase):
self.import_pkg_form.clean()
class TestUpdatePackageForm(helpers.APIMockTestCase):
class TestUpdatePackageForm(helpers.APITestCase):
def setUp(self):
super(TestUpdatePackageForm, self).setUp()
@ -131,7 +131,7 @@ class TestUpdatePackageForm(helpers.APIMockTestCase):
self.update_pkg_form.fields['description'].initial)
class TestModifyPackageForm(helpers.APIMockTestCase):
class TestModifyPackageForm(helpers.APITestCase):
def setUp(self):
super(TestModifyPackageForm, self).setUp()
@ -256,7 +256,7 @@ class TestModifyPackageForm(helpers.APIMockTestCase):
redirect='test_redirect')
class TestSelectCategories(helpers.APIMockTestCase):
class TestSelectCategories(helpers.APITestCase):
def setUp(self):
super(TestSelectCategories, self).setUp()

View File

@ -29,7 +29,7 @@ from muranodashboard.packages import views
from openstack_dashboard.test import helpers
class TestPackageView(helpers.APIMockTestCase):
class TestPackageView(helpers.APITestCase):
def setUp(self):
super(TestPackageView, self).setUp()
@ -87,7 +87,7 @@ class TestPackageView(helpers.APIMockTestCase):
self.assertFalse(views.is_app(mock_wizard))
class TestDetailView(helpers.APIMockTestCase):
class TestDetailView(helpers.APITestCase):
def setUp(self):
super(TestDetailView, self).setUp()
@ -129,7 +129,7 @@ class TestDetailView(helpers.APIMockTestCase):
redirect='test_redirect')
class TestModifyPackageView(helpers.APIMockTestCase):
class TestModifyPackageView(helpers.APITestCase):
def setUp(self):
super(TestModifyPackageView, self).setUp()
@ -188,7 +188,7 @@ class TestModifyPackageView(helpers.APIMockTestCase):
self.modify_pkg_view.get_form.assert_called_once_with()
class TestImportPackageWizard(helpers.APIMockTestCase):
class TestImportPackageWizard(helpers.APITestCase):
def setUp(self):
super(TestImportPackageWizard, self).setUp()
@ -782,7 +782,7 @@ class TestImportPackageWizard(helpers.APIMockTestCase):
'package': 'test_package'}, kwargs)
class TestImportBundleWizard(helpers.APIMockTestCase):
class TestImportBundleWizard(helpers.APITestCase):
def setUp(self):
super(TestImportBundleWizard, self).setUp()
@ -1086,7 +1086,7 @@ class TestImportBundleWizard(helpers.APIMockTestCase):
'horizon:app-catalog:packages:index')
class TestPackageDefinitionsView(helpers.APIMockTestCase):
class TestPackageDefinitionsView(helpers.APITestCase):
def setUp(self):
super(TestPackageDefinitionsView, self).setUp()

View File

@ -23,7 +23,7 @@ from muranodashboard import api
from openstack_dashboard.test import helpers
class TestApi(helpers.APIMockTestCase):
class TestApi(helpers.APITestCase):
def setUp(self):
super(TestApi, self).setUp()

View File

@ -17,7 +17,7 @@ django-floppyforms>=1.7.0,<2 # BSD
oslo.log>=3.36.0 # Apache-2.0
semantic-version>=2.3.1 # BSD
horizon>=14.0.0.0b3 # Apache-2.0
horizon>=15.0.0.0b1 # Apache-2.0
# message extraction
Babel!=2.4.0,>=2.3.4 # BSD