mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-07-01 02:36:52 +00:00
Blacking.
This commit is contained in:
@@ -543,7 +543,9 @@ class TestGatherCustomExclusions(BaseStdout):
|
||||
# Can only test in the invalid domain case
|
||||
# because of the settings global variable.
|
||||
@mock.patch("updateHostsFile.input", side_effect=["foo", "no"])
|
||||
@mock.patch("updateHostsFile.is_valid_user_provided_domain_format", return_value=False)
|
||||
@mock.patch(
|
||||
"updateHostsFile.is_valid_user_provided_domain_format", return_value=False
|
||||
)
|
||||
def test_basic(self, *_):
|
||||
gather_custom_exclusions("foo", [])
|
||||
|
||||
@@ -552,7 +554,9 @@ class TestGatherCustomExclusions(BaseStdout):
|
||||
self.assertIn(expected, output)
|
||||
|
||||
@mock.patch("updateHostsFile.input", side_effect=["foo", "yes", "bar", "no"])
|
||||
@mock.patch("updateHostsFile.is_valid_user_provided_domain_format", return_value=False)
|
||||
@mock.patch(
|
||||
"updateHostsFile.is_valid_user_provided_domain_format", return_value=False
|
||||
)
|
||||
def test_multiple(self, *_):
|
||||
gather_custom_exclusions("foo", [])
|
||||
|
||||
|
||||
@@ -944,7 +944,7 @@ def remove_dups_and_excl(merge_file, exclusion_regexes, output_file=None):
|
||||
continue
|
||||
|
||||
# Issue #1628
|
||||
if ("@" in stripped_rule):
|
||||
if "@" in stripped_rule:
|
||||
continue
|
||||
|
||||
# Normalize rule
|
||||
|
||||
Reference in New Issue
Block a user