MCPcopy
hub / github.com/StevenBlack/hosts / test_get_defaults

Method test_get_defaults

testUpdateHostsFile.py:102–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

100# Project Settings
101class TestGetDefaults(Base):
102 def test_get_defaults(self):
103 with self.mock_property("updateHostsFile.BASEDIR_PATH"):
104 updateHostsFile.BASEDIR_PATH = "foo"
105 actual = get_defaults()
106 expected = {
107 "numberofrules": 0,
108 "datapath": "foo" + self.sep + "data",
109 "freshen": True,
110 "replace": False,
111 "backup": False,
112 "skipstatichosts": False,
113 "keepdomaincomments": True,
114 "extensionspath": "foo" + self.sep + "extensions",
115 "extensions": [],
116 "nounifiedhosts": False,
117 "compress": False,
118 "minimise": False,
119 "outputsubfolder": "",
120 "hostfilename": "hosts",
121 "targetip": "0.0.0.0",
122 "sourcedatafilename": "update.json",
123 "sourcesdata": [],
124 "readmefilename": "readme.md",
125 "readmetemplate": ("foo" + self.sep + "readme_template.md"),
126 "readmedata": {},
127 "readmedatafilename": ("foo" + self.sep + "readmeData.json"),
128 "exclusionpattern": r"([a-zA-Z\d-]+\.){0,}",
129 "exclusionregexes": [],
130 "exclusions": [],
131 "commonexclusions": ["hulu.com"],
132 "blacklistfile": "foo" + self.sep + "blacklist",
133 "whitelistfile": "foo" + self.sep + "whitelist",
134 }
135 self.assertDictEqual(actual, expected)
136
137
138# End Project Settings

Callers

nothing calls this directly

Calls 2

get_defaultsFunction · 0.90
mock_propertyMethod · 0.80

Tested by

no test coverage detected