Merge pull request #4682 from noviluni/remove_python2_reminiscence

remove python 2 reminiscence in cookies
This commit is contained in:
Mikhail Korobov 2020-07-16 23:58:58 +05:00 committed by GitHub
commit 9a74a71c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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'])