Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8 Change-Id: I67df079c0a61099f5728a7d9cd7a186ec14b2741
This commit is contained in:
parent
115585fac0
commit
39e9ba4f2c
@ -176,7 +176,7 @@ class HostsTests(test.BaseAdminViewTests):
|
||||
host_get.return_value = host
|
||||
host_update.side_effect = self.exceptions.blazar
|
||||
|
||||
res = self.client.post(reverse(UPDATE_URL_BASE, args=[host['id']]),
|
||||
res = self.client.post(reverse(UPDATE_URL_BASE, args=[host['id']]),
|
||||
form_data)
|
||||
|
||||
host_get.assert_called_once_with(test.IsHttpRequest(), host['id'])
|
||||
|
@ -156,7 +156,7 @@ class CreateForm(forms.SelfHandlingForm):
|
||||
'class': 'switched',
|
||||
'data-switch-on': 'source',
|
||||
'data-source-instance': _('Affinity Rule')})
|
||||
)
|
||||
)
|
||||
|
||||
# Fields for both of host and instance reservations
|
||||
resource_properties = forms.CharField(
|
||||
@ -175,8 +175,8 @@ class CreateForm(forms.SelfHandlingForm):
|
||||
'resource_type': 'physical:host',
|
||||
'min': data['min_hosts'],
|
||||
'max': data['max_hosts'],
|
||||
'hypervisor_properties': (data['hypervisor_properties']
|
||||
or ''),
|
||||
'hypervisor_properties': (data['hypervisor_properties'] or
|
||||
''),
|
||||
'resource_properties': data['resource_properties'] or ''
|
||||
}
|
||||
]
|
||||
@ -227,8 +227,8 @@ class CreateForm(forms.SelfHandlingForm):
|
||||
cleaned_data['end_date'].replace(tzinfo=None)
|
||||
).astimezone(timezone('UTC'))
|
||||
else:
|
||||
cleaned_data['end_date'] = (cleaned_data['start_date']
|
||||
+ datetime.timedelta(days=1))
|
||||
cleaned_data['end_date'] = (cleaned_data['start_date'] +
|
||||
datetime.timedelta(days=1))
|
||||
|
||||
|
||||
class UpdateForm(forms.SelfHandlingForm):
|
||||
|
@ -14,16 +14,16 @@
|
||||
from horizon.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 blazar_dashboard
|
||||
import blazar_dashboard.enabled
|
||||
import openstack_dashboard.enabled
|
||||
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(
|
||||
[
|
||||
blazar_dashboard.enabled,
|
||||
|
@ -22,6 +22,8 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
from blazar_dashboard.version import version_info as blazar_dashboard_version
|
||||
|
||||
# -- General configuration ----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
@ -60,7 +62,6 @@ copyright = u'2017, OpenStack Foundation'
|
||||
# built documents.
|
||||
#
|
||||
# Version info
|
||||
from blazar_dashboard.version import version_info as blazar_dashboard_version
|
||||
release = blazar_dashboard_version.release_string()
|
||||
# The short X.Y version.
|
||||
version = blazar_dashboard_version.version_string()
|
||||
|
@ -7,7 +7,7 @@
|
||||
# be installed in a specific order.
|
||||
#
|
||||
# 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
|
||||
mock>=2.0.0 # BSD
|
||||
|
3
tox.ini
3
tox.ini
@ -62,6 +62,9 @@ deps =
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[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 = .venv,.git,.tox,dist,*lib/python*,*egg,build,node_modules
|
||||
max-complexity = 20
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user