summaryrefslogtreecommitdiff
path: root/tests/unit/components/test_braveadblock.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/components/test_braveadblock.py')
-rw-r--r--tests/unit/components/test_braveadblock.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unit/components/test_braveadblock.py b/tests/unit/components/test_braveadblock.py
index fc50cb595..7dcffc91f 100644
--- a/tests/unit/components/test_braveadblock.py
+++ b/tests/unit/components/test_braveadblock.py
@@ -22,7 +22,7 @@ import logging
import csv
from typing import Iterable, Tuple
-from PyQt5.QtCore import QUrl
+from qutebrowser.qt.core import QUrl
import pytest
@@ -327,7 +327,7 @@ def test_whitelist_on_dataset(config_stub, easylist_easyprivacy):
assert not blockutils.is_whitelisted_url(url)
config_stub.val.content.blocking.whitelist = []
assert not blockutils.is_whitelisted_url(url)
- whitelist_url = url.toString(QUrl.RemovePath) + "/*"
+ whitelist_url = url.toString(QUrl.UrlFormattingOption.RemovePath) + "/*"
config_stub.val.content.blocking.whitelist = [whitelist_url]
assert blockutils.is_whitelisted_url(url)
@@ -430,3 +430,8 @@ def test_corrupt_cache_handling(ad_blocker, message_mock, caplog):
assert msg.text == (
"Reading adblock filter data failed (corrupted data?). "
"Please run :adblock-update.")
+
+
+def test_resource_type_strings_complete():
+ defined = set(braveadblock._RESOURCE_TYPE_STRINGS) - {None}
+ assert defined == set(ResourceType)