From 05c09a147641646d64f01f6c8ea6fcac6c5ebc43 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 7 Jul 2016 13:30:38 +0200 Subject: [PATCH] tests: fix test_adblock for new download manager --- tests/unit/browser/test_adblock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/browser/test_adblock.py b/tests/unit/browser/test_adblock.py index be801de73..1a9c820a7 100644 --- a/tests/unit/browser/test_adblock.py +++ b/tests/unit/browser/test_adblock.py @@ -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