remove python 2 reminiscence in cookies

This commit is contained in:
Marc 2020-07-16 14:19:46 +02:00
parent 38496a00b7
commit 0e0d1ad643
2 changed files with 0 additions and 6 deletions

View File

@ -186,9 +186,6 @@ class WrappedResponse:
def info(self):
return self
# python3 cookiejars calls get_all
def get_all(self, name, default=None):
return [to_unicode(v, errors='replace')
for v in self.response.headers.getlist(name)]
# python2 cookiejars calls getheaders
getheaders = get_all

View File

@ -64,9 +64,6 @@ class WrappedResponseTest(TestCase):
def test_info(self):
self.assertIs(self.wrapped.info(), self.wrapped)
def test_getheaders(self):
self.assertEqual(self.wrapped.getheaders('content-type'), ['text/html'])
def test_get_all(self):
# get_all result must be native string
self.assertEqual(self.wrapped.get_all('content-type'), ['text/html'])