summaryrefslogtreecommitdiff
path: root/test/unit/test_swiftclient.py
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2022-02-17 11:21:40 +0000
committerTim Burke <tim.burke@gmail.com>2022-03-16 15:06:19 -0700
commit2636965f38a7788bbee19fc90088384834670b10 (patch)
treeba693b60748bdcea934e6a8434b158bc7fadeb91 /test/unit/test_swiftclient.py
parent22a05b2039d0178b52fa3546de8ab265df112636 (diff)
downloadpython-swiftclient-2636965f38a7788bbee19fc90088384834670b10.tar.gz
Drop support for Python 2
There's a lot of cleanup possible, but this is a start. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: Ia1176b7fd5434d52070d482a37abfbb98800cdb3
Diffstat (limited to 'test/unit/test_swiftclient.py')
-rw-r--r--test/unit/test_swiftclient.py28
1 files changed, 1 insertions, 27 deletions
diff --git a/test/unit/test_swiftclient.py b/test/unit/test_swiftclient.py
index ea5f502..f6dc258 100644
--- a/test/unit/test_swiftclient.py
+++ b/test/unit/test_swiftclient.py
@@ -1976,34 +1976,8 @@ class TestHTTPConnection(MockHttpTest):
self.assertFalse(resp.read())
self.assertTrue(resp.closed)
- @unittest.skipIf(six.PY3, 'python2 specific test')
- def test_response_python2_headers(self):
- '''Test utf-8 headers in Python 2.
- '''
- _, conn = c.http_connection(u'http://www.test.com/')
- conn.resp = MockHttpResponse(
- status=200,
- headers={
- '\xd8\xaa-unicode': '\xd8\xaa-value',
- 'empty-header': ''
- }
- )
-
- resp = conn.getresponse()
- self.assertEqual(
- '\xd8\xaa-value', resp.getheader('\xd8\xaa-unicode'))
- self.assertEqual(
- '\xd8\xaa-value', resp.getheader('\xd8\xaa-UNICODE'))
- self.assertEqual('', resp.getheader('empty-header'))
- self.assertEqual(
- dict([('\xd8\xaa-unicode', '\xd8\xaa-value'),
- ('empty-header', ''),
- ('etag', '"%s"' % EMPTY_ETAG)]),
- dict(resp.getheaders()))
-
- @unittest.skipIf(six.PY2, 'python3 specific test')
def test_response_python3_headers(self):
- '''Test latin1-encoded headers in Python 3.
+ '''Test latin1-encoded headers.
'''
_, conn = c.http_connection(u'http://www.test.com/')
conn.resp = MockHttpResponse(