[tests] directly monkeypatch requests Session

need for later changes
This commit is contained in:
Thomas Weißschuh 2014-08-18 19:11:07 +00:00
parent cef25b58da
commit d5e8be4979

View file

@ -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)