summaryrefslogtreecommitdiff
path: root/tests/unit/utils.py
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2016-01-18 18:34:47 -0800
committerTim Burke <tim.burke@gmail.com>2016-01-18 21:14:53 -0800
commitdcdd7152152b59a33d9af8f518eb0e05e4f125fe (patch)
treed680895d89c0a56d30126b02919e920fa07f10d2 /tests/unit/utils.py
parent64c2c2eaaae630da67653aaf18ad9ea319af1baa (diff)
downloadpython-swiftclient-dcdd7152152b59a33d9af8f518eb0e05e4f125fe.tar.gz
Get rid of FakeConn cruft
Presumably, this was left over from before the httplib -> requests transition? Change-Id: I7f505514070bf9d8fefda77203bee78f0a5dd71d
Diffstat (limited to 'tests/unit/utils.py')
-rw-r--r--tests/unit/utils.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/unit/utils.py b/tests/unit/utils.py
index 0f013a8..17e07ac 100644
--- a/tests/unit/utils.py
+++ b/tests/unit/utils.py
@@ -100,27 +100,11 @@ def fake_http_connect(*code_iter, **kwargs):
self._is_closed = True
self.headers = headers or {}
- def connect(self):
- self._is_closed = False
-
- def close(self):
- self._is_closed = True
-
- def isclosed(self):
- return self._is_closed
-
def getresponse(self):
if kwargs.get('raise_exc'):
raise Exception('test')
return self
- def getexpect(self):
- if self.status == -2:
- raise RequestException()
- if self.status == -3:
- return FakeConn(507)
- return FakeConn(100)
-
def getheaders(self):
if self.headers:
return self.headers.items()
@@ -199,7 +183,6 @@ def fake_http_connect(*code_iter, **kwargs):
timestamp=timestamp)
if fake_conn.status <= 0:
raise RequestException()
- fake_conn.connect()
return fake_conn
connect.code_iter = code_iter
@@ -250,7 +233,6 @@ class MockHttpTest(testtools.TestCase):
self.request_log.append((parsed, method, url, args,
kwargs, conn.resp))
conn.host = conn.resp.host
- conn.isclosed = conn.resp.isclosed
conn.resp.has_been_read = False
_orig_read = conn.resp.read