mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-27 09:15:50 +00:00
[tests] directly monkeypatch requests Session
need for later changes
This commit is contained in:
parent
cef25b58da
commit
d5e8be4979
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue