Correct is_whitelisted_host test
This commit is contained in:
parent
d55e6d7d7e
commit
9da15ae2f9
@ -96,11 +96,10 @@ class TestGetFileObj:
|
|||||||
class TestIsWhitelistedHost:
|
class TestIsWhitelistedHost:
|
||||||
"""Test function adblock.is_whitelisted_host."""
|
"""Test function adblock.is_whitelisted_host."""
|
||||||
|
|
||||||
def test_without_option(self, config_stub):
|
def test_without_hosts(self, config_stub):
|
||||||
"""Option host-blocking-whitelist does not exist."""
|
"""No hosts are whitelisted."""
|
||||||
config_stub.data = {'content': {}}
|
config_stub.data = {'content': {'host-blocking-whitelist': None}}
|
||||||
with pytest.raises(configexc.NoOptionError):
|
assert not adblock.is_whitelisted_host('qutebrowser.org')
|
||||||
adblock.is_whitelisted_host('qutebrowser.org')
|
|
||||||
|
|
||||||
def test_with_match(self, config_stub):
|
def test_with_match(self, config_stub):
|
||||||
"""Given host is in the whitelist."""
|
"""Given host is in the whitelist."""
|
||||||
|
Loading…
Reference in New Issue
Block a user