|
22 | 22 | import json |
23 | 23 | import logging |
24 | 24 | import os |
25 | | -from requests.structures import CaseInsensitiveDict |
26 | 25 | import tempfile |
27 | 26 | import unittest |
28 | 27 | from unittest import mock |
|
32 | 31 | from urllib3.exceptions import HTTPError |
33 | 32 |
|
34 | 33 | import swiftclient |
| 34 | +from swiftclient.client import LowerKeyCaseInsensitiveDict |
35 | 35 | from swiftclient.service import SwiftError |
36 | 36 | import swiftclient.shell |
37 | 37 | import swiftclient.utils |
@@ -245,7 +245,7 @@ def test_stat_container_not_found(self, connection): |
245 | 245 | swiftclient.ClientException( |
246 | 246 | 'test', |
247 | 247 | http_status=404, |
248 | | - http_response_headers=CaseInsensitiveDict({ |
| 248 | + http_response_headers=LowerKeyCaseInsensitiveDict({ |
249 | 249 | 'x-trans-id': 'someTransId'}) |
250 | 250 | ) |
251 | 251 | argv = ["", "stat", "container"] |
@@ -344,7 +344,7 @@ def test_stat_object_not_found(self, connection): |
344 | 344 | connection.return_value.head_object.side_effect = \ |
345 | 345 | swiftclient.ClientException( |
346 | 346 | 'test', http_status=404, |
347 | | - http_response_headers=CaseInsensitiveDict({ |
| 347 | + http_response_headers=LowerKeyCaseInsensitiveDict({ |
348 | 348 | 'x-trans-id': 'someTransId'}) |
349 | 349 | ) |
350 | 350 | argv = ["", "stat", "container", "object"] |
@@ -791,7 +791,7 @@ def _fake_retry(conn, *args, **kwargs): |
791 | 791 |
|
792 | 792 | body = mock.MagicMock() |
793 | 793 | body.resp.read.side_effect = RequestException('test_exc') |
794 | | - return (CaseInsensitiveDict({ |
| 794 | + return (LowerKeyCaseInsensitiveDict({ |
795 | 795 | 'content-type': 'text/plain', |
796 | 796 | 'etag': '2cbbfe139a744d6abbe695e17f3c1991', |
797 | 797 | 'x-trans-id': 'someTransId'}), |
@@ -841,7 +841,7 @@ def _fake_retry(conn, *args, **kwargs): |
841 | 841 |
|
842 | 842 | body = mock.MagicMock() |
843 | 843 | body.__iter__.side_effect = RequestException('test_exc') |
844 | | - return (CaseInsensitiveDict({ |
| 844 | + return (LowerKeyCaseInsensitiveDict({ |
845 | 845 | 'content-type': 'text/plain', |
846 | 846 | 'etag': '2cbbfe139a744d6abbe695e17f3c1991', |
847 | 847 | 'x-trans-id': 'someTransId'}), |
@@ -871,7 +871,7 @@ def _fake_retry(conn, *args, **kwargs): |
871 | 871 | def test_download_bad_content_length(self, connection): |
872 | 872 | objcontent = io.BytesIO(b'objcontent') |
873 | 873 | connection.return_value.get_object.side_effect = [ |
874 | | - (CaseInsensitiveDict({ |
| 874 | + (LowerKeyCaseInsensitiveDict({ |
875 | 875 | 'content-type': 'text/plain', |
876 | 876 | 'content-length': 'BAD', |
877 | 877 | 'etag': '2cbbfe139a744d6abbe695e17f3c1991', |
|
0 commit comments