summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-12-22 17:49:23 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-12-22 18:19:42 +0100
commit877cd42a53310e52bfcfdadd9e0b210d5a3ab8d1 (patch)
tree66f40d9bcd7210569367552bcf6f90c8cc616506
parent591ea308f7c379585a612e74b58c6cf7bfb5a542 (diff)
downloadqutebrowser-877cd42a53310e52bfcfdadd9e0b210d5a3ab8d1.tar.gz
qutebrowser-877cd42a53310e52bfcfdadd9e0b210d5a3ab8d1.zip
tests: Fix test_adblock without adblock module
-rw-r--r--tests/unit/components/test_adblock.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/components/test_adblock.py b/tests/unit/components/test_adblock.py
index 902f6e337..5b83ddbd3 100644
--- a/tests/unit/components/test_adblock.py
+++ b/tests/unit/components/test_adblock.py
@@ -255,6 +255,9 @@ def test_disabled_blocking_update(
config_stub, tmpdir, caplog, host_blocker_factory, blocking_enabled, method
):
"""Ensure no URL is blocked when host blocking should be disabled."""
+ if blocking_enabled and method == 'auto':
+ pytest.importorskip('adblock')
+
config_stub.val.content.blocking.hosts.lists = generic_blocklists(tmpdir)
config_stub.val.content.blocking.enabled = blocking_enabled
config_stub.val.content.blocking.method = method