tests: fix test_adblock for new download manager
This commit is contained in:
parent
d42d980dda
commit
05c09a1476
@ -92,12 +92,12 @@ class FakeDownloadManager:
|
||||
|
||||
"""Mock browser.downloads.DownloadManager."""
|
||||
|
||||
def get(self, url, fileobj, **kwargs):
|
||||
def get(self, url, target, **kwargs):
|
||||
"""Return a FakeDownloadItem instance with a fileobj.
|
||||
|
||||
The content is copied from the file the given url links to.
|
||||
"""
|
||||
download_item = FakeDownloadItem(fileobj, name=url.path())
|
||||
download_item = FakeDownloadItem(target.fileobj, name=url.path())
|
||||
with open(url.path(), 'rb') as fake_url_file:
|
||||
shutil.copyfileobj(fake_url_file, download_item.fileobj)
|
||||
return download_item
|
||||
|
Loading…
Reference in New Issue
Block a user