From: Ben Darnell Date: Sun, 10 Apr 2016 19:42:50 +0000 (-0400) Subject: Run autopep8 X-Git-Tag: v4.4.0b1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6a3bef73cfdd731804ce8d11caea862eef8d8c;p=thirdparty%2Ftornado.git Run autopep8 --- diff --git a/tornado/auth.py b/tornado/auth.py index 9e6e1754d..ee3db4e95 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -995,8 +995,8 @@ class FacebookGraphMixin(OAuth2Mixin): self._on_get_user_info, future, session, fields), access_token=session["access_token"], appsecret_proof=hmac.new(key=client_secret.encode('utf8'), - msg=session["access_token"].encode('utf8'), - digestmod=hashlib.sha256).hexdigest(), + msg=session["access_token"].encode('utf8'), + digestmod=hashlib.sha256).hexdigest(), fields=",".join(fields) ) diff --git a/tornado/test/auth_test.py b/tornado/test/auth_test.py index 0a7d9bbfa..92616fa30 100644 --- a/tornado/test/auth_test.py +++ b/tornado/test/auth_test.py @@ -430,8 +430,8 @@ class AuthTest(AsyncHTTPTestCase): parsed = json_decode(response.body) self.assertEqual(parsed, {u'access_token': {u'key': u'hjkl', - u'screen_name': u'foo', - u'secret': u'vbnm'}, + u'screen_name': u'foo', + u'secret': u'vbnm'}, u'name': u'Foo', u'screen_name': u'foo', u'username': u'foo'}) diff --git a/tornado/test/simple_httpclient_test.py b/tornado/test/simple_httpclient_test.py index 0f60aba7c..74073182d 100644 --- a/tornado/test/simple_httpclient_test.py +++ b/tornado/test/simple_httpclient_test.py @@ -773,6 +773,6 @@ class ChunkedWithContentLengthTest(AsyncHTTPTestCase): def test_chunked_with_content_length(self): # Make sure the invalid headers are detected with ExpectLog(gen_log, ("Malformed HTTP message from None: Response " - "with both Transfer-Encoding and Content-Length")): + "with both Transfer-Encoding and Content-Length")): response = self.fetch('/chunkwithcl') self.assertEqual(response.code, 599) diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py index 24e6b07a7..fd4d137d8 100644 --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -1479,6 +1479,7 @@ class RaiseWithReasonTest(SimpleHandlerTestCase): def test_httperror_str_from_httputil(self): self.assertEqual(str(HTTPError(682)), "HTTP 682: Unknown") + @wsgi_safe class ErrorHandlerXSRFTest(WebTestCase): def get_handlers(self): @@ -2187,6 +2188,7 @@ class BaseStreamingRequestFlowControlTest(object): 'data_received', 'data_received', 'post'])) + class DecoratedStreamingRequestFlowControlTest( BaseStreamingRequestFlowControlTest, WebTestCase): diff --git a/tornado/testing.py b/tornado/testing.py index f000771db..e3f7ea608 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -98,7 +98,7 @@ def bind_unused_port(reuse_port=False): Returns a tuple (socket, port). """ sock = netutil.bind_sockets(None, '127.0.0.1', family=socket.AF_INET, - reuse_port=reuse_port)[0] + reuse_port=reuse_port)[0] port = sock.getsockname()[1] return sock, port