From 41fd8411cf6dfac1a0d1524b34689c3e3bc1fbda Mon Sep 17 00:00:00 2001 From: "Vitor M. A. da Cruz" Date: Fri, 21 Jun 2013 16:54:24 -0300 Subject: [PATCH] Update stubs.py `VCRHTTPResponse.close` method must be defined for urllib3. `VCRHTTPResponse.read` does not need to care about the paremeters passed to it --- vcr/stubs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vcr/stubs.py b/vcr/stubs.py index 91ed0e2..898e350 100644 --- a/vcr/stubs.py +++ b/vcr/stubs.py @@ -21,10 +21,13 @@ class VCRHTTPResponse(object): self.length = self.msg.getheader('content-length') or None - def read(self, chunked=False): + def read(self, *args, **kwargs): # Note: I'm pretty much ignoring any chunking stuff because # I don't really understand what it is or how it works. - return self._content.read() + return self._content.read(*args, **kwargs) + + def close(self): + return True def isclosed(self): # Urllib3 seems to call this because it actually uses