Merge "Fixed Unit test for Heat-dashboard"

This commit is contained in:
Zuul 2022-05-23 16:43:01 +00:00 committed by Gerrit Code Review
commit e098a608ef
5 changed files with 42 additions and 37 deletions

View File

@ -27,7 +27,7 @@
- horizon-non-primary-django-jobs
- horizon-nodejs14-jobs
- openstack-lower-constraints-jobs
- openstack-python3-yoga-jobs-horizon
- openstack-python3-zed-jobs-horizon
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:

View File

@ -308,7 +308,6 @@ class TestCase(horizon_helpers.TestCase):
def mock_rest_request(**args):
mock_args = {
'user.is_authenticated.return_value': True,
'is_ajax.return_value': True,
'policy.check.return_value': True,
'body': ''
}
@ -398,6 +397,12 @@ class APITestCase(TestCase):
return self.heatclient
class RestAPITestCase(TestCase):
def setUp(self):
super().setUp()
mock.patch('horizon.utils.http.is_ajax', return_value=True).start()
# Need this to test both Glance API V1 and V2 versions
class ResetImageAPIVersionMixin(object):

View File

@ -19,7 +19,7 @@ from heat_dashboard.test import helpers as test
from openstack_dashboard import api
class ValidateRestTestCase(test.TestCase):
class ValidateRestTestCase(test.RestAPITestCase):
@mock.patch.object(heat.api, 'heat')
def test_validate_post(self, hc):
body = '''{"template_url":"http://localhost/template.yaml"}'''
@ -32,7 +32,7 @@ class ValidateRestTestCase(test.TestCase):
hc.template_validate.assert_called_once_with(request, **kwargs)
class HeatRestTestCase(test.TestCase):
class HeatRestTestCase(test.RestAPITestCase):
#
# Services
#

View File

@ -1,7 +1,7 @@
amqp==2.1.1
appdirs==1.3.0
appdirs==1.4.0
asn1crypto==0.23.0
Babel==2.3.4
Babel==2.6.0
cachetools==2.0.0
cffi==1.14.0
chardet==3.0.4
@ -10,14 +10,14 @@ cmd2==0.8.0
colorama==0.3.9
contextlib2==0.4.0
coverage==4.0
cryptography==2.7
cryptography==3.0
debtcollector==1.2.0
decorator==4.1.0
decorator==4.4.2
deprecation==1.0
Django==2.2
django-appconf==1.0.2
Django==3.2
django-appconf==1.0.5
django-babel==0.6.2
django-compressor==2.0
django-compressor==2.4.1
django-pyscss==2.0.2
docutils==0.11
dogpile.cache==0.6.2
@ -27,7 +27,7 @@ fasteners==0.7.0
fixtures==3.0.0
futurist==1.2.0
greenlet==0.4.10
horizon==18.3.1
horizon==22.0.0
idna==2.6
iso8601==0.1.11
Jinja2==2.10
@ -35,7 +35,7 @@ jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
keystoneauth1==3.16.0
keystoneauth1==4.3.1
kombu==4.0.0
linecache2==1.0.0
MarkupSafe==1.0
@ -49,21 +49,21 @@ openstacksdk==0.35.0
os-client-config==1.28.0
os-service-types==1.7.0
osc-lib==1.8.0
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.i18n==3.15.3
oslo.log==3.36.0
oslo.concurrency==4.5.0
oslo.config==8.8.0
oslo.context==4.1.0
oslo.i18n==5.1.0
oslo.log==4.7.0
oslo.messaging==5.29.0
oslo.middleware==3.31.0
oslo.policy==1.30.0
oslo.serialization==2.18.0
oslo.policy==3.11.0
oslo.serialization==4.3.0
oslo.service==1.24.0
oslo.utils==3.33.0
osprofiler==2.3.0
oslo.utils==4.12.0
osprofiler==3.4.2
Paste==2.0.2
PasteDeploy==1.5.0
pbr==2.0.0
pbr==5.5.0
pika==0.10.0
pika-pool==0.1.3
Pint==0.5
@ -72,12 +72,12 @@ prettytable==0.7.2
pycparser==2.18
pyinotify==0.9.6
pymongo==3.0.2
pyOpenSSL==17.1.0
pyOpenSSL==19.1.0
pyparsing==2.1.0
pyperclip==1.5.27
pyScss==1.3.7
python-cinderclient==5.0.0
python-dateutil==2.5.3
python-cinderclient==8.0.0
python-dateutil==2.8.1
python-glanceclient==2.8.0
python-heatclient==1.10.0
python-keystoneclient==3.22.0
@ -86,21 +86,21 @@ python-neutronclient==6.7.0
python-novaclient==9.1.0
python-swiftclient==3.2.0
pytz==2013.6
PyYAML==3.13
PyYAML==6.0
rcssmin==1.0.6
repoze.lru==0.7
requests==2.14.2
requests==2.25.1
requestsexceptions==1.2.0
restructuredtext-lint==1.1.1
rfc3986==0.3.1
rjsmin==1.0.12
rfc3986==1.5.0
rjsmin==1.1.0
Routes==2.3.1
selenium==2.50.1
semantic-version==2.3.1
simplejson==3.5.1
six==1.10.0
six==1.16.0
statsd==3.2.1
stevedore==1.20.0
stevedore==3.3.0
tenacity==3.2.1
termcolor==1.1.0
testtools==2.2.0
@ -109,7 +109,7 @@ unittest2==1.1.0
vine==1.1.4
warlock==1.2.0
WebOb==1.7.1
wrapt==1.7.0
wrapt==1.11
XStatic==1.0.0
XStatic-Angular==1.5.8.0
XStatic-Angular-Bootstrap==2.2.0.0
@ -124,9 +124,9 @@ XStatic-D3==3.5.17.0
XStatic-Font-Awesome==4.7.0.0
XStatic-Hogan==2.0.0.2
XStatic-Jasmine==2.4.1.1
XStatic-jQuery==1.8.2.1
XStatic-jQuery==1.12.4.1
XStatic-JQuery-Migrate==1.2.1.1
XStatic-jquery-ui==1.10.4.1
XStatic-jquery-ui==1.12.1.1
XStatic-JQuery.quicksearch==2.0.3.1
XStatic-JQuery.TableSorter==2.14.5.1
XStatic-JSEncrypt==2.3.1.1

View File

@ -7,12 +7,12 @@
# be installed in a specific order.
#
# PBR should always appear first
pbr!=2.1.0,>=2.0.0 # Apache-2.0
pbr>=5.5.0 # Apache-2.0
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>=18.3.1 # Apache-2.0
horizon>=22.0.0 # Apache-2.0
xstatic-angular-uuid>=0.0.4.0 # MIT
xstatic-angular-vis>=4.16.0.0 # MIT