heat-dashboard/heat_dashboard
Andreas Jaeger 79ef24a784 Remove six usage (2/2)
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
2020-01-11 22:06:54 +01:00
..
api Remove six usage (2/2) 2020-01-11 22:06:54 +01:00
conf Include policy in tree for ease of deployment 2018-01-26 01:08:51 +00:00
content Remove six usage (1/2) 2020-01-11 20:54:19 +01:00
enabled Update hacking version 2019-03-27 14:00:03 +08:00
local_settings.d Rename API_TIMEOUT and API_PARALLEL vars 2018-02-23 16:33:39 +09:00
locale Imported Translations from Zanata 2019-08-06 10:46:41 +00:00
static/dashboard/project/heat_dashboard Merge "Group resource icons by project" 2018-08-13 23:52:22 +00:00
test Remove six usage (2/2) 2020-01-11 22:06:54 +01:00
__init__.py move files. 2017-10-06 14:42:23 +09:00
exceptions.py add template generator 2017-10-06 14:44:14 +09:00