From d5e8be49799e511a0e029b90effbdf827a4e8c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 18 Aug 2014 19:11:07 +0000 Subject: [PATCH] [tests] directly monkeypatch requests Session need for later changes --- tests/storage/test_http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/storage/test_http.py b/tests/storage/test_http.py index 648f98a..d3d74cf 100644 --- a/tests/storage/test_http.py +++ b/tests/storage/test_http.py @@ -41,7 +41,7 @@ def test_list(monkeypatch): u'\n'.join([u'BEGIN:VCALENDAR'] + items + [u'END:VCALENDAR']) ] * 2 - def get(method, url, *a, **kw): + def get(self, method, url, *a, **kw): assert method == 'GET' assert url == collection_url r = Response() @@ -52,7 +52,7 @@ def test_list(monkeypatch): r.encoding = 'ISO-8859-1' return r - monkeypatch.setattr('requests.request', get) + monkeypatch.setattr('requests.sessions.Session.request', get) s = HttpStorage(url=collection_url)