From 9da15ae2f960e4611c179b3514d58fc94cd6f857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20Jul=C3=A9?= Date: Sat, 5 Dec 2015 12:41:52 +0100 Subject: [PATCH] Correct is_whitelisted_host test --- tests/unit/browser/test_adblock.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/unit/browser/test_adblock.py b/tests/unit/browser/test_adblock.py index afc400d1d..1dfe55fd9 100644 --- a/tests/unit/browser/test_adblock.py +++ b/tests/unit/browser/test_adblock.py @@ -96,11 +96,10 @@ class TestGetFileObj: class TestIsWhitelistedHost: """Test function adblock.is_whitelisted_host.""" - def test_without_option(self, config_stub): - """Option host-blocking-whitelist does not exist.""" - config_stub.data = {'content': {}} - with pytest.raises(configexc.NoOptionError): - adblock.is_whitelisted_host('qutebrowser.org') + def test_without_hosts(self, config_stub): + """No hosts are whitelisted.""" + config_stub.data = {'content': {'host-blocking-whitelist': None}} + assert not adblock.is_whitelisted_host('qutebrowser.org') def test_with_match(self, config_stub): """Given host is in the whitelist."""