Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: I4fbccf98e81ba2ce19210101593011ac3de086ac
This commit is contained in:
parent
d626f2f236
commit
4618a32fec
@ -29,6 +29,8 @@ import sys
|
|||||||
|
|
||||||
import django
|
import django
|
||||||
|
|
||||||
|
from magnum_ui import version as magnumui_ver
|
||||||
|
|
||||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
|
ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
|
||||||
|
|
||||||
@ -43,8 +45,6 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE',
|
|||||||
# https://docs.djangoproject.com/en/1.8/releases/1.7/#standalone-scripts
|
# https://docs.djangoproject.com/en/1.8/releases/1.7/#standalone-scripts
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from magnum_ui import version as magnumui_ver
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
@ -58,8 +58,8 @@ class MagnumRestTestCase(test.TestCase):
|
|||||||
def test_cluster_template_delete(self, client):
|
def test_cluster_template_delete(self, client):
|
||||||
test_cluster_template = TEST.cluster_templates.first()
|
test_cluster_template = TEST.cluster_templates.first()
|
||||||
request = self.mock_rest_request(
|
request = self.mock_rest_request(
|
||||||
body='{"cluster_template_id":'
|
body='{"cluster_template_id":' +
|
||||||
+ str(test_cluster_template['uuid']) + '}')
|
str(test_cluster_template['uuid']) + '}')
|
||||||
response = magnum.ClusterTemplates().delete(request)
|
response = magnum.ClusterTemplates().delete(request)
|
||||||
|
|
||||||
self.assertStatusCode(response, 204)
|
self.assertStatusCode(response, 204)
|
||||||
|
@ -16,16 +16,16 @@
|
|||||||
from horizon.test.settings import * # noqa: F403,H303
|
from horizon.test.settings import * # noqa: F403,H303
|
||||||
from openstack_dashboard.test.settings import * # noqa: F403,H303
|
from openstack_dashboard.test.settings import * # noqa: F403,H303
|
||||||
|
|
||||||
# pop these keys to avoid log warnings about deprecation
|
|
||||||
# update_dashboards will populate them anyway
|
|
||||||
HORIZON_CONFIG.pop('dashboards', None)
|
|
||||||
HORIZON_CONFIG.pop('default_dashboard', None)
|
|
||||||
|
|
||||||
# Update the dashboards with magnum_ui
|
# Update the dashboards with magnum_ui
|
||||||
import magnum_ui.enabled
|
import magnum_ui.enabled
|
||||||
import openstack_dashboard.enabled
|
import openstack_dashboard.enabled
|
||||||
from openstack_dashboard.utils import settings
|
from openstack_dashboard.utils import settings
|
||||||
|
|
||||||
|
# pop these keys to avoid log warnings about deprecation
|
||||||
|
# update_dashboards will populate them anyway
|
||||||
|
HORIZON_CONFIG.pop('dashboards', None)
|
||||||
|
HORIZON_CONFIG.pop('default_dashboard', None)
|
||||||
|
|
||||||
settings.update_dashboards(
|
settings.update_dashboards(
|
||||||
[
|
[
|
||||||
magnum_ui.enabled,
|
magnum_ui.enabled,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
# be installed in a specific order.
|
# be installed in a specific order.
|
||||||
#
|
#
|
||||||
# Hacking should appear first in case something else depends on pep8
|
# Hacking should appear first in case something else depends on pep8
|
||||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
nodeenv>=0.9.4 # BSD
|
nodeenv>=0.9.4 # BSD
|
||||||
|
3
tox.ini
3
tox.ini
@ -33,6 +33,9 @@ basepython = python3
|
|||||||
commands = flake8 {posargs}
|
commands = flake8 {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
# F405 TEMPLATES may be undefined, or defined from star imports
|
||||||
|
# (because it is not easy to avoid this in openstack_dashboard.test.settings)
|
||||||
|
ignore = F405
|
||||||
exclude = .git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
|
exclude = .git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*,.ropeproject,node_modules
|
||||||
max-complexity = 20
|
max-complexity = 20
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user