1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-10 09:35:34 +00:00

Update stubs.py

`VCRHTTPResponse.close` method must be defined for urllib3.

`VCRHTTPResponse.read` does not need to care about the paremeters passed to it
This commit is contained in:
Vitor M. A. da Cruz
2013-06-21 16:54:24 -03:00
parent 74941f68c6
commit 41fd8411cf

View File

@@ -21,10 +21,13 @@ class VCRHTTPResponse(object):
self.length = self.msg.getheader('content-length') or None 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 # Note: I'm pretty much ignoring any chunking stuff because
# I don't really understand what it is or how it works. # 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): def isclosed(self):
# Urllib3 seems to call this because it actually uses # Urllib3 seems to call this because it actually uses