diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index 7c1af0661..ce49dc4df 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -20,8 +20,8 @@ OpenStack Client interface. Handles the REST calls and responses. """ import logging -import pkg_resources +import pkg_resources import requests from six.moves.urllib import parse as urlparse diff --git a/keystoneclient/tests/test_auth_token_middleware.py b/keystoneclient/tests/test_auth_token_middleware.py index 7adcfc54b..c6636ab39 100644 --- a/keystoneclient/tests/test_auth_token_middleware.py +++ b/keystoneclient/tests/test_auth_token_middleware.py @@ -672,7 +672,7 @@ class CommonAuthTokenMiddlewareTest(object): self.middleware(req.environ, self.start_fake_response) self.assertEqual(200, self.response_status) - # This time use the PKI(Z) token + # This time use the PKI(Z) token req.headers['X-Auth-Token'] = token self.middleware(req.environ, self.start_fake_response) diff --git a/keystoneclient/tests/v2_0/test_shell.py b/keystoneclient/tests/v2_0/test_shell.py index 5f80fc1da..0fafb7167 100644 --- a/keystoneclient/tests/v2_0/test_shell.py +++ b/keystoneclient/tests/v2_0/test_shell.py @@ -145,10 +145,9 @@ class ShellTests(utils.TestCase): self.run_command('user-update --name new-user1' ' --email user@email.com --enabled true 1') self.assert_called('PUT', '/users/1') - self.assertRequestBodyIs(json={'user': {'id': '1', - 'email': 'user@email.com', - 'enabled': True, - 'name': 'new-user1'}}) + body = {'user': {'id': '1', 'email': 'user@email.com', + 'enabled': True, 'name': 'new-user1'}} + self.assertRequestBodyIs(json=body) required = 'User not updated, no arguments present.' out = self.run_command('user-update 1') diff --git a/test-requirements.txt b/test-requirements.txt index c58b1056d..e0387f043 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=0.8.0,<0.9 +hacking>=0.9.2,<0.10 coverage>=3.6 discover diff --git a/tox.ini b/tox.ini index 82c2435d7..e2b861783 100644 --- a/tox.ini +++ b/tox.ini @@ -38,7 +38,8 @@ commands = # H803 Commit message should not end with a period (do not remove per list discussion) # H405: multi line docstring summary not separated with an empty line # E122: continuation line missing indentation or outdented -ignore = F821,H304,H803,H405,E122 +# H904: Wrap long lines in parentheses instead of a backslash +ignore = F821,H304,H803,H405,E122,H904 show-source = True exclude = .venv,.tox,dist,doc,*egg,build,*openstack/common*