(self)
| 1306 | self.assertEqual(actual, expected) |
| 1307 | |
| 1308 | def test_set_extensions(self): |
| 1309 | with open(self.readme_file, "w") as f: |
| 1310 | json.dump({}, f) |
| 1311 | |
| 1312 | kwargs = dict( |
| 1313 | extensions=["com", "org"], |
| 1314 | outputsubfolder="foo", |
| 1315 | numberofrules=5, |
| 1316 | sourcesdata="hosts", |
| 1317 | nounifiedhosts=False, |
| 1318 | ) |
| 1319 | update_readme_data(self.readme_file, **kwargs) |
| 1320 | |
| 1321 | if platform.system().lower() == "windows": |
| 1322 | sep = "/" |
| 1323 | else: |
| 1324 | sep = self.sep |
| 1325 | |
| 1326 | expected = { |
| 1327 | "com-org": {"location": "foo" + sep, 'nounifiedhosts': False, "sourcesdata": "hosts", "entries": 5} |
| 1328 | } |
| 1329 | |
| 1330 | with open(self.readme_file, "r") as f: |
| 1331 | actual = json.load(f) |
| 1332 | self.assertEqual(actual, expected) |
| 1333 | |
| 1334 | def test_set_no_unified_hosts(self): |
| 1335 | with open(self.readme_file, "w") as f: |
nothing calls this directly
no test coverage detected