Danny Navarro avatar Danny Navarro committed 0bd7d1a

cosmetic

Comments (0)

Files changed (1)

tests/test_request.py

     req.environ['HTTP_CONTENT_LENGTH'] = '0'
     req.headers.items()
 
-
 def test_nonstr_keys():
     # non-string env keys shouldn't break req.headers
     req = Request.blank('/')
     ]:
         eq_(parse_auth_params(s), d)
 
-
 def test_from_file():
     req = Request.blank('http://example.com:8000/test.html?params')
     equal_req(req)
 
 @raises(ValueError)
 def test_environ_getter():
-    """Parameter environ_getter in Request is no longer valid and should raise
-    an error in case it's used"""
+    """
+    Parameter environ_getter in Request is no longer valid and should raise
+    an error in case it's used
+    """
     class env(object):
         def __init__(self, env):
             self.env = env
     Request(environ_getter=env({'a':1}).env_getter)
 
 def test_unicode_errors():
-    """Passing unicode_errors != NoDefault should assign value to
-    dictionary['unicode_errors'], else not"""
+    """
+    Passing unicode_errors != NoDefault should assign value to
+    dictionary['unicode_errors'], else not
+    """
     r = Request({'a':1}, unicode_errors='strict')
     ok_('unicode_errors' in r.__dict__)
     r = Request({'a':1}, unicode_errors=NoDefault)
 
 @raises(DeprecationWarning)
 def test_charset_deprecation1():
-    """Any class that inherits from BaseRequest cannot define a default_charset
-    attribute"""
+    """
+    Any class that inherits from BaseRequest cannot define a default_charset
+    attribute
+    """
     class NewRequest(BaseRequest):
         default_charset = 'utf-8'
         def __init__(self, environ, **kw):
 
 @raises(DeprecationWarning)
 def test_charset_deprecation2():
-    """Any class that inherits from BaseRequest cannot define a charset attr
-    that is instance of str"""
+    """
+    Any class that inherits from BaseRequest cannot define a charset attr
+    that is instance of str
+    """
     class NewRequest(BaseRequest):
         charset = 'utf-8'
         def __init__(self, environ, **kw):
 
 @raises(TypeError)
 def test_unexpected_kw():
-    """Passed an attr in kw that does not exist in the class, should raise an
-    error"""
+    """
+    Passed an attr in kw that does not exist in the class, should raise an
+    error
+    """
     r = Request({'a':1}, **{'this_does_not_exist':1})
 
 def test_expected_kw():
     eq_(getattr(r, 'server_name', None), '127.0.0.1')
 
 def test_body_file_setter():
-    """"If body_file is passed and it's instance of str, we define
+    """"
+    If body_file is passed and it's instance of str, we define
     environ['wsgi.input'] and content_length. Plus, while deleting the
-    attribute, we should get '' and 0 respectively"""
+    attribute, we should get '' and 0 respectively
+    """
     r = Request({'a':1}, **{'body_file':'hello world'}) 
     eq_(r.environ['wsgi.input'].getvalue(), 'hello world')
     eq_(int(r.environ['CONTENT_LENGTH']), len('hello world'))
     del r.body_file
     eq_(r.environ['wsgi.input'].getvalue(), '')
     eq_(int(r.environ['CONTENT_LENGTH']), 0)
-
-
-
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.