From 37816f90fdc824aabd58eaae96df066fa6cd321a Mon Sep 17 00:00:00 2001 From: Kurt Griffiths Date: Thu, 14 Jan 2016 11:52:49 -0600 Subject: [PATCH] test(pep8): Fix errors from new checks --- falcon/request.py | 4 ++-- falcon/response.py | 5 +++-- tests/test_wsgi.py | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/falcon/request.py b/falcon/request.py index f40f461..c7322b4 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -351,8 +351,8 @@ class Request(object): @property def client_accepts_msgpack(self): - return (self.client_accepts('application/x-msgpack') - or self.client_accepts('application/msgpack')) + return (self.client_accepts('application/x-msgpack') or + self.client_accepts('application/msgpack')) @property def client_accepts_xml(self): diff --git a/falcon/response.py b/falcon/response.py index e3e1629..c4d3c18 100644 --- a/falcon/response.py +++ b/falcon/response.py @@ -20,8 +20,6 @@ from six import string_types as STRING_TYPES # but a dict-like structure. This fixes that issue. # See issue https://github.com/falconry/falcon/issues/556 from six.moves import http_cookies -SimpleCookie = http_cookies.SimpleCookie -CookieError = http_cookies.CookieError from falcon.response_helpers import header_property, format_range from falcon.response_helpers import is_ascii_encodable @@ -29,6 +27,9 @@ from falcon.util import dt_to_http, TimezoneGMT from falcon.util.uri import encode as uri_encode from falcon.util.uri import encode_value as uri_encode_value +SimpleCookie = http_cookies.SimpleCookie +CookieError = http_cookies.CookieError + GMT_TIMEZONE = TimezoneGMT() diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py index 10d98da..98aa9ae 100644 --- a/tests/test_wsgi.py +++ b/tests/test_wsgi.py @@ -2,8 +2,10 @@ import sys import time from wsgiref.simple_server import make_server -if 'java' not in sys.platform: +try: import multiprocessing +except ImportError: + pass # Jython import requests from testtools.matchers import Equals, MatchesRegex