Browse Source

Enable check for E124 rule

Fix E124 failures and enable check for E124

E124 closing bracket does not match visual indentation

Change-Id: Iec6af44362dcf613cfaccbccbe53de82aba51a6a
changes/34/159834/1
Sergey Nikitin 8 years ago
parent
commit
53f0c5428f
  1. 6
      novaclient/tests/unit/test_client.py
  2. 3
      novaclient/tests/unit/test_http.py
  3. 10
      novaclient/tests/unit/v2/fakes.py
  4. 2
      tox.ini

6
novaclient/tests/unit/test_client.py

@ -316,12 +316,10 @@ class ClientTest(utils.TestCase):
cs.http_log_debug = True
cs.http_log_req('GET', '/foo', {'headers': {}})
cs.http_log_req('GET', '/foo', {'headers':
{'X-Auth-Token': 'totally_bogus'}
})
{'X-Auth-Token': 'totally_bogus'}})
cs.http_log_req('GET', '/foo', {'headers':
{'X-Foo': 'bar',
'X-Auth-Token': 'totally_bogus'}
})
'X-Auth-Token': 'totally_bogus'}})
cs.http_log_req('GET', '/foo', {'headers': {},
'data':
'{"auth": {"passwordCredentials": '

3
novaclient/tests/unit/test_http.py

@ -97,8 +97,7 @@ class ClientTest(utils.TestCase):
headers = {"X-Auth-Token": "token",
"X-Auth-Project-Id": "project_id",
"User-Agent": cl.USER_AGENT,
'Accept': 'application/json',
}
'Accept': 'application/json'}
mock_request.assert_called_with(
"GET",
"http://example.com/hi",

10
novaclient/tests/unit/v2/fakes.py

@ -1359,9 +1359,9 @@ class FakeHTTPClient(base_client.HTTPClient):
#
def get_os_security_group_rules(self, **kw):
return (200, {}, {"security_group_rules": [
{'id': 1, 'parent_group_id': 1, 'group_id': 2,
'ip_protocol': 'TCP', 'from_port': 22, 'to_port': 22,
'cidr': '10.0.0.0/8'}
{'id': 1, 'parent_group_id': 1, 'group_id': 2,
'ip_protocol': 'TCP', 'from_port': 22, 'to_port': 22,
'cidr': '10.0.0.0/8'}
]})
def delete_os_security_group_rules_1(self, **kw):
@ -1392,8 +1392,8 @@ class FakeHTTPClient(base_client.HTTPClient):
#
def get_os_security_group_default_rules(self, **kw):
return (200, {}, {"security_group_default_rules": [
{'id': 1, 'ip_protocol': 'TCP', 'from_port': 22,
'to_port': 22, 'cidr': '10.0.0.0/8'}
{'id': 1, 'ip_protocol': 'TCP', 'from_port': 22,
'to_port': 22, 'cidr': '10.0.0.0/8'}
]})
def delete_os_security_group_default_rules_1(self, **kw):

2
tox.ini

@ -45,7 +45,7 @@ downloadcache = ~/cache/pip
# Following checks are ignored on purpose.
#
# Additional checks are also ignored on purpose: F811, F821
ignore = E124,F811,F821,H404,H405
ignore = F811,F821,H404,H405
show-source = True
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/source/conf.py

Loading…
Cancel
Save