Commits

Anonymous committed 2375c17

Fix tests to match recent fixes to the remove_conditional_headers and cookie serialization (no more ';' at the end)

Comments (0)

Files changed (2)

tests/test_request.txt

 
     >>> from datetime import datetime
     >>> req = Request.blank('/')
-    >>> req.if_match = 'some-etag'
+    >>> req.if_none_match = 'some-etag'
     >>> req.if_modified_since = datetime(2005, 1, 1, 12, 0)
     >>> req.environ['HTTP_ACCEPT_ENCODING'] = 'gzip'
     >>> print req.headers
-    {'Host': 'localhost:80', 'If-Match': 'some-etag', 'Accept-Encoding': 'gzip', 'If-Modified-Since': 'Sat, 01 Jan 2005 12:00:00 GMT'}
+    {'If-None-Match': 'some-etag', 'Host': 'localhost:80', 'Accept-Encoding': 'gzip', 'If-Modified-Since': 'Sat, 01 Jan 2005 12:00:00 GMT'}
     >>> req.remove_conditional_headers()
     >>> print req.headers
     {'Host': 'localhost:80'}

tests/test_response.txt

     12
     >>> res.headers['content-length']
     '12'
-    
+
 Content-Length is only applied when setting the body to a string; you
 have to set it manually otherwise.  There are also getters and setters
 for the various pieces:
 
     >>> res.set_cookie('test', 'value')
     >>> res.headers['set-cookie']
-    'test=value; Path=/;'
+    'test=value; Path=/'
     >>> res.set_cookie('test2', 'value2', max_age=10000)
     >>> res.headers['set-cookie'] # We only see the last header
-    'test2=value2; expires="... GMT"; Max-Age=10000; Path=/;'
+    'test2=value2; expires="... GMT"; Max-Age=10000; Path=/'
     >>> res.headers.getall('set-cookie')
-    ['test=value; Path=/;', 'test2=value2; expires="... GMT"; Max-Age=10000; Path=/;']
+    ['test=value; Path=/', 'test2=value2; expires="... GMT"; Max-Age=10000; Path=/']
     >>> res.unset_cookie('test')
     >>> res.headers.getall('set-cookie')
-    ['test2=value2; expires="... GMT"; Max-Age=10000; Path=/;']
+    ['test2=value2; expires="... GMT"; Max-Age=10000; Path=/']
 
 Most headers are available in a parsed getter/setter form through
 properties: