Fix cookiejar_and_cache move.
This commit is contained in:
parent
03f4d738ab
commit
8ea91b5bbc
@ -33,6 +33,8 @@ from qutebrowser.config import configexc
|
||||
|
||||
class FakeNetworkCache(QAbstractNetworkCache):
|
||||
|
||||
"""Fake cache with no data."""
|
||||
|
||||
def cacheSize(self):
|
||||
return 0
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user