summaryrefslogtreecommitdiff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-02-14 00:41:39 +0000
committerGerrit Code Review <review@openstack.org>2014-02-14 00:41:39 +0000
commit19d7e1812a99d73785146667ae2f3a7156f06898 (patch)
treecbc5160a6836fe642274ab13aec8d8555a6f9203 /tests/utils.py
parent0c7264c21d06d37de5db0beee677c4e026dc8f45 (diff)
parentb182112719ab87942472e44aa3446ea0eb19a289 (diff)
downloadpython-swiftclient-2.0.tar.gz
Merge "Port to python-requests"2.0
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 93972e4..ff2834a 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -12,7 +12,7 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-from httplib import HTTPException
+from requests import RequestException
from time import sleep
@@ -74,7 +74,7 @@ def fake_http_connect(*code_iter, **kwargs):
def getexpect(self):
if self.status == -2:
- raise HTTPException()
+ raise RequestException()
if self.status == -3:
return FakeConn(507)
return FakeConn(100)
@@ -141,7 +141,7 @@ def fake_http_connect(*code_iter, **kwargs):
etag = etag_iter.next()
timestamp = timestamps_iter.next()
if status <= 0:
- raise HTTPException()
+ raise RequestException()
fake_conn = FakeConn(status, etag, body=kwargs.get('body', ''),
timestamp=timestamp)
fake_conn.connect()