diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-12-22 18:07:47 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-12-22 19:20:49 +0100 |
commit | 5ef774bb30d0d05a6424ba6b8d685c14dcf988ca (patch) | |
tree | ea24c2ed3feaa2cc829a6cc694a782222863fb95 | |
parent | 877cd42a53310e52bfcfdadd9e0b210d5a3ab8d1 (diff) | |
download | qutebrowser-5ef774bb30d0d05a6424ba6b8d685c14dcf988ca.tar.gz qutebrowser-5ef774bb30d0d05a6424ba6b8d685c14dcf988ca.zip |
adblock: Show message when loading lists
Same as with the hosts blocker
-rw-r--r-- | qutebrowser/components/braveadblock.py | 5 | ||||
-rw-r--r-- | tests/end2end/test_adblock_e2e.py | 2 | ||||
-rw-r--r-- | tests/unit/components/test_braveadblock.py | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/qutebrowser/components/braveadblock.py b/qutebrowser/components/braveadblock.py index 5a6cf1152..340ed0fac 100644 --- a/qutebrowser/components/braveadblock.py +++ b/qutebrowser/components/braveadblock.py @@ -228,9 +228,8 @@ class BraveAdBlocker: """Install block lists after files have been downloaded.""" self._engine = adblock.Engine(filter_set) self._engine.serialize_to_file(str(self._cache_path)) - logger.info( - "braveadblock: Filters successfully read from %s sources", done_count - ) + message.info( + f"braveadblock: Filters successfully read from {done_count} sources.") def update_files(self) -> None: """Update files when the config changed.""" diff --git a/tests/end2end/test_adblock_e2e.py b/tests/end2end/test_adblock_e2e.py index e442c1835..f8ecc596f 100644 --- a/tests/end2end/test_adblock_e2e.py +++ b/tests/end2end/test_adblock_e2e.py @@ -49,7 +49,7 @@ def test_adblock(method, quteproc, server): quteproc.wait_for(message="hostblock: Read 1 hosts from 1 sources.") if adblock is not None: quteproc.wait_for( - message="braveadblock: Filters successfully read from 1 sources") + message="braveadblock: Filters successfully read from 1 sources.") quteproc.open_path('data/blocking/external_logo.html') diff --git a/tests/unit/components/test_braveadblock.py b/tests/unit/components/test_braveadblock.py index 8b953c439..c653ce4e5 100644 --- a/tests/unit/components/test_braveadblock.py +++ b/tests/unit/components/test_braveadblock.py @@ -341,7 +341,7 @@ def test_update_easylist_easyprivacy_directory( assert_only_one_success_message(caplog.messages) assert ( caplog.messages[-1] - == "braveadblock: Filters successfully read from 2 sources" + == "braveadblock: Filters successfully read from 2 sources." ) assert_urls(ad_blocker, NOT_OKAY_URLS, True) assert_urls(ad_blocker, OKAY_URLS, False) @@ -361,7 +361,7 @@ def test_update_empty_directory_blocklist(ad_blocker, config_stub, empty_dir, ca assert_only_one_success_message(caplog.messages) assert ( caplog.messages[-1] - == "braveadblock: Filters successfully read from 0 sources" + == "braveadblock: Filters successfully read from 0 sources." ) # There are no filters, so no ads should be blocked. |