Remove HostBlockerStub

This commit is contained in:
Florian Bruhin 2018-12-10 16:08:43 +01:00
parent 8508928f3d
commit 007250033a
2 changed files with 2 additions and 22 deletions

View File

@ -190,8 +190,8 @@ def testdata_scheme(qapp):
@pytest.fixture
def web_tab_setup(qtbot, tab_registry, session_manager_stub,
greasemonkey_manager, fake_args, host_blocker_stub,
config_stub, testdata_scheme):
greasemonkey_manager, fake_args, config_stub,
testdata_scheme):
"""Shared setup for webkit_tab/webengine_tab."""
# Make sure error logging via JS fails tests
config_stub.val.content.javascript.log = {
@ -328,15 +328,6 @@ def key_config_stub(config_stub, monkeypatch):
return keyconf
@pytest.fixture
def host_blocker_stub(stubs):
"""Fixture which provides a fake host blocker object."""
stub = stubs.HostBlockerStub()
objreg.register('host-blocker', stub)
yield stub
objreg.delete('host-blocker')
@pytest.fixture
def quickmark_manager_stub(stubs):
"""Fixture which provides a fake quickmark manager object."""

View File

@ -459,17 +459,6 @@ class QuickmarkManagerStub(UrlMarkManagerStub):
self.delete(key)
class HostBlockerStub:
"""Stub for the host-blocker object."""
def __init__(self):
self.blocked_hosts = set()
def is_blocked(self, url, first_party_url=None):
return url in self.blocked_hosts
class SessionManagerStub:
"""Stub for the session-manager object."""