horizon recently switched from the third-party mock to unittest.mock.
This breaks heat-dashboard unit tests somehow.
We no longer support py27 and we can use the standard library
unittest.mock module. Rather than investigating the cause of
the failure, it would be nice to switch to unittest.mock.
horizon dependency is updated to 18.3.1 as unittest.mock is used
since 18.3.0 and 18.3.0 has an issue that it always requires pytest.
lower-constraints is updated to match horizon requirements.
hacking local-check-factory is disabled temporarily due to
the incompatibility with hacking 2.0 or later.
https://review.opendev.org/#/c/715690/ will recover it.
Change-Id: I517d6d7d36410c64bf48ad958b3e2115725a6491
assertItemsEqual was renamed to assertCountEqual in Python 3, and the
testsuite is failing now - rename it.
See also https://six.readthedocs.io/#six.assertCountEqual
This unbreaks the testsuite.
Change-Id: I95c81cfd6ab9bc7384c585ef5aa625dad9a57caf
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3,
convert six usage to Python 3 code.
This changes urllib usage.
mock.patch usage in heat_dashboard/test/tests/api/test_heat.py
is modified to cope with the mix usage of urllib from python3 (in
heat-dashboard) and six.moves.urllib (in heatclient).
In the case of the mix usage, patching urllib.request.urlopen() only
does not work as urllib.request.urlopen() is not called after
resolving a lazy loading in six and the resolved object is
six.moves.urllib.request is called. The previous code depends on
the behavior in heatclient read_url_content() and the method should
be mocked instead. Considering this, mocking in api/test_heat.py
is modified to mock direct methods called in the heat-dashboard code.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Icf3f889770242b02023fe22c405cfa2d823581a5
Needed-By: https://review.opendev.org/701743
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.
This changes everything besides urllib.
Change-Id: I43f76bc07d846341c1f5da69614e2be51ee05e30
Needed-By: https://review.opendev.org/701743
Horizon defined a project template 'horizon-non-primary-django-jobs'
for django jobs. This patch use that template to run django jobs
here and also fixes failed test cases for django2.2 support.
For information please refer [1]
[1] https://review.opendev.org/#/c/681969/
Change-Id: I3ab81402633b9abe39e49c3921585db992050540
The underlying APIs changed between Python2 and Python3, where
once they returned a string, they now return bytes. This change
enforces the decoding of the returned value as a UTF-8. Failure
to decode is handled by the existing exception handling.
Tests were updated to mimic the new API.
Change-Id: I98b474840a163f60e98aed0f75bc6b9df2a9aa00
Story: 2003343
Task: 24381
This patch adds basic tests to verify that heat-dashboard is
installed and could be opened.
heat-dashboard-integration-tests job is added in a
non-voting mode.
Depends-On: https://review.openstack.org/634712
Change-Id: I2550d6fcd1ce4e05502f247e227aaec05e762fcb
The porting of mock is complete. This fullfills the
community goal
200~"Remove Use of mox/mox3 for Testing" set for Rocky:
https://governance.openstack.org/tc/goals/rocky/mox_removal.html
This commit does the following code:
- Remove dead code that was previously used by mox.
- Raise the requirement to the Rocky M2 relase of Horizon.
- Convert the clients to use mock.
Change-Id: I33521b4bc8e873d50b1d2390e544eea0923dca4f
Signed-off-by: Chuck Short <chucks@redhat.com>
In Python3, assertRegexpMatches & assertNotRegexpMatches
are deprecated in favor of assertRegex and assertNotRegex
Change-Id: I770e45ea04b799fa102887275acc95cdddbfd162
Add support for OS::Designate::Recordset as a new resource,
which you can use from Template Generator.
Change-Id: I08bf9dacd35cb1d28e929d5e4763f7586d481606
Task: #19674
Story: #2002033
Add pagination support to event list api
and show event list by page in stack detail page.
Change-Id: Ie1699b267a4ca4c33669ea2fccfd170618fc2560
Story: #1343684
Task: #18885
Add support for OS::Designate::Zone as a new resource,
which you can use from Template Generator.
Change-Id: Ie98b2d7b5b6446cb527af14e0e417cca023a79a8
Task: #19673
Story: #2002032
We're going to switch to default Django test runner by default.
This patch renames test files to make tests descoverable by
Nose and Django test runners without addidional configuration.
Related blueprint: improve-horizon-testing
Change-Id: If4ee8dcd173c2f331bf34cf93c489029489c63ea
Dropped mox3 from HeatRestTestCase, apart of the
community mox3 goal.
Change-Id: Ic161dfdbcb39c29be3980063ed547c6105b60d9a
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
Apart of the mox3 community goal for Rocky.
Change-Id: Iabd07327946c0b5e3641c4c907a00fbf3661beff
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
Apart of the mox3 community goal from Rocky.
Change-Id: I1833ee4e55a31b5035937a49a1dd21cb72820be5
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>
Apart of the mox3 removal comunity goal.
Change-Id: I36a3bb836822e6b59f66ac51068a118f4fb4f4a4
Depends-On: Ibf41998cb154c5170e8038f5b2708c928b68b8b4
Signed-off-by: Charles Short <zulcss@gmail.com>