From cf01a743aff009b18c42c553a53640d44f026f5c Mon Sep 17 00:00:00 2001 From: Roman Levin Date: Thu, 24 Jul 2014 23:30:11 +0200 Subject: [PATCH] Replace setattr --- test_requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_requests.py b/test_requests.py index 004d6e8..694b779 100755 --- a/test_requests.py +++ b/test_requests.py @@ -728,7 +728,7 @@ class RequestsTestCase(unittest.TestCase): def stream(self, chunk_size, decode_content=None): raise socket.error() - setattr(r, 'raw', RawMock()) + r.raw = RawMock() with pytest.raises(ConnectionError): list(r.iter_content()) -- 2.34.1