From dcdd7152152b59a33d9af8f518eb0e05e4f125fe Mon Sep 17 00:00:00 2001 From: Tim Burke <tim.burke@gmail.com> Date: Mon, 18 Jan 2016 18:34:47 -0800 Subject: [PATCH] Get rid of FakeConn cruft Presumably, this was left over from before the httplib -> requests transition? Change-Id: I7f505514070bf9d8fefda77203bee78f0a5dd71d --- tests/unit/utils.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 0f013a8a..17e07ac4 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