projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59f916c
)
Fix test with StringIO.
author
schlamar
<marc.schlaich@gmail.com>
Wed, 10 Apr 2013 06:20:34 +0000
(08:20 +0200)
committer
schlamar
<marc.schlaich@gmail.com>
Wed, 10 Apr 2013 06:24:33 +0000
(08:24 +0200)
test_requests.py
patch
|
blob
|
history
diff --git
a/test_requests.py
b/test_requests.py
index 5a0ed98062897c53288e9547f9af602810b923ed..5440347af38e94a0457baa516ec04b889b66b41e 100644
(file)
--- a/
test_requests.py
+++ b/
test_requests.py
@@
-380,6
+380,11
@@
class RequestsTestCase(unittest.TestCase):
def test_response_is_iterable(self):
r = requests.Response()
io = StringIO.StringIO('abc')
+ read_ = io.read
+
+ def read_mock(amt, decode_content=None):
+ return read_(amt)
+ setattr(io, 'read', read_mock)
r.raw = io
self.assertTrue(next(iter(r)))
io.close()