From 340c2b93230b0392d81c5d4e76539b6960586a0d Mon Sep 17 00:00:00 2001 From: Charles Short Date: Sun, 29 Apr 2018 10:12:51 -0400 Subject: [PATCH] Require the (soon-to-be) Rocky version of Horizon ... or at least the first published tarball which will lead to Rocky. On the other side this means forcing the usage of mox as long as there are tests that depends on it (the switch was already flipped in Horizon, so it needs to be enabled here). This allows us to depend on newer Horizon features, including changes to the test suite that are useful for the mox removal effort. Change-Id: Ibf41998cb154c5170e8038f5b2708c928b68b8b4 Signed-off-by: Charles Short Story: #2002037 Task: #19678 --- heat_dashboard/test/helpers.py | 6 ++++++ heat_dashboard/test/settings.py | 1 + heat_dashboard/test/tests/api/heat_tests.py | 2 ++ lower-constraints.txt | 2 +- requirements.txt | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/heat_dashboard/test/helpers.py b/heat_dashboard/test/helpers.py index 5091a5f0..a23a9d68 100644 --- a/heat_dashboard/test/helpers.py +++ b/heat_dashboard/test/helpers.py @@ -372,6 +372,8 @@ class BaseAdminViewTests(TestCase): For testing admin-only views and functionality. """ + use_mox = True + def setActiveUser(self, *args, **kwargs): if "roles" not in kwargs: kwargs['roles'] = [self.roles.admin._info] @@ -395,6 +397,8 @@ class APITestCase(TestCase): For use with tests which deal with the underlying clients rather than stubbing out the openstack_dashboard.api.* methods. """ + use_mox = True + def setUp(self): super(APITestCase, self).setUp() utils.patch_middleware_get_user() @@ -449,6 +453,8 @@ class APITestCase(TestCase): # Need this to test both Glance API V1 and V2 versions class ResetImageAPIVersionMixin(object): + use_mox = True + def setUp(self): super(ResetImageAPIVersionMixin, self).setUp() project_api.glance.VERSIONS.clear_active_cache() diff --git a/heat_dashboard/test/settings.py b/heat_dashboard/test/settings.py index 23e90938..065eb176 100644 --- a/heat_dashboard/test/settings.py +++ b/heat_dashboard/test/settings.py @@ -13,6 +13,7 @@ # Default to Horizons test settings to avoid any missing keys import heat_dashboard.enabled +import openstack_dashboard.enabled from openstack_dashboard.test.settings import * # noqa: F403,H303 diff --git a/heat_dashboard/test/tests/api/heat_tests.py b/heat_dashboard/test/tests/api/heat_tests.py index 590ee8c6..8f8a4249 100644 --- a/heat_dashboard/test/tests/api/heat_tests.py +++ b/heat_dashboard/test/tests/api/heat_tests.py @@ -21,6 +21,8 @@ from horizon import exceptions class HeatApiTests(test.APITestCase): + use_mox = True + def test_stack_list(self): api_stacks = self.stacks.list() limit = getattr(settings, 'API_RESULT_LIMIT', 1000) diff --git a/lower-constraints.txt b/lower-constraints.txt index 25f10202..b3716121 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -32,7 +32,7 @@ flake8-import-order==0.12 futurist==1.2.0 greenlet==0.4.10 hacking==0.12.0 -horizon==13.0.0 +horizon==14.0.0.0b1 idna==2.6 iso8601==0.1.11 Jinja2==2.10 diff --git a/requirements.txt b/requirements.txt index 890c13fb..4108ae7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,4 @@ python-heatclient>=1.10.0 # Apache-2.0 # This will be installed from git in OpenStack CI if the job setting # required-projects for horizon: -horizon>=13.0.0 # Apache-2.0 +horizon>=14.0.0.0b1 # Apache-2.0