python-tornado/fix-test-python35.patch

17 lines
752 B
Diff
Raw Normal View History

--- a/tornado/test/web_test.py
+++ b/tornado/test/web_test.py
@@ -1547,8 +1547,11 @@
def test_clear_all_cookies(self):
response = self.fetch('/', headers={'Cookie': 'foo=bar; baz=xyzzy'})
set_cookies = sorted(response.headers.get_list('Set-Cookie'))
- self.assertTrue(set_cookies[0].startswith('baz=;'))
- self.assertTrue(set_cookies[1].startswith('foo=;'))
+ # Python 3.5 sends 'baz="";'; older versions use 'baz=;'
+ self.assertTrue(set_cookies[0].startswith('baz=;') or
+ set_cookies[0].startswith('baz="";'))
+ self.assertTrue(set_cookies[1].startswith('foo=;') or
+ set_cookies[1].startswith('foo="";'))
class PermissionError(Exception):