From 8ea91b5bbce40e0dc92439a76fbe83dc45714cf9 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 31 Aug 2015 08:00:21 +0200 Subject: [PATCH] Fix cookiejar_and_cache move. --- tests/helpers/stubs.py | 2 ++ tests/unit/browser/test_commands.py | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/helpers/stubs.py b/tests/helpers/stubs.py index 88884cf73..53d97e0a0 100644 --- a/tests/helpers/stubs.py +++ b/tests/helpers/stubs.py @@ -33,6 +33,8 @@ from qutebrowser.config import configexc class FakeNetworkCache(QAbstractNetworkCache): + """Fake cache with no data.""" + def cacheSize(self): return 0 diff --git a/tests/unit/browser/test_commands.py b/tests/unit/browser/test_commands.py index c570ad1b4..2288f86d1 100644 --- a/tests/unit/browser/test_commands.py +++ b/tests/unit/browser/test_commands.py @@ -22,8 +22,6 @@ import collections import pytest -from PyQt5.QtNetwork import (QNetworkCookieJar, QAbstractNetworkCache, - QNetworkCacheMetaData) from qutebrowser.browser import commands from qutebrowser.mainwindow import tabbedbrowser @@ -36,18 +34,6 @@ ObjectsRet = collections.namedtuple('Dispatcher', ['tb', 'cd']) pytestmark = pytest.mark.usefixtures('cookiejar_and_cache') -@pytest.yield_fixture(autouse=True) -def cookiejar_and_cache(): - """Fixture providing a fake cookie jar and cache.""" - jar = QNetworkCookieJar() - cache = FakeNetworkCache() - objreg.register('cookie-jar', jar) - objreg.register('cache', cache) - yield - objreg.delete('cookie-jar') - objreg.delete('cache') - - @pytest.yield_fixture def objects(qtbot, default_config, key_config_stub, tab_registry, host_blocker_stub):