(self)
| 1284 | self.assertEqual(actual, expected) |
| 1285 | |
| 1286 | def test_modify_fields(self): |
| 1287 | with open(self.readme_file, "w") as f: |
| 1288 | json.dump({"base": "soprano"}, f) |
| 1289 | |
| 1290 | kwargs = dict( |
| 1291 | extensions=None, outputsubfolder="foo", numberofrules=5, sourcesdata="hosts", nounifiedhosts=False |
| 1292 | ) |
| 1293 | update_readme_data(self.readme_file, **kwargs) |
| 1294 | |
| 1295 | if platform.system().lower() == "windows": |
| 1296 | sep = "/" |
| 1297 | else: |
| 1298 | sep = self.sep |
| 1299 | |
| 1300 | expected = { |
| 1301 | "base": {"location": "foo" + sep, 'nounifiedhosts': False, "sourcesdata": "hosts", "entries": 5}, |
| 1302 | } |
| 1303 | |
| 1304 | with open(self.readme_file, "r") as f: |
| 1305 | actual = json.load(f) |
| 1306 | self.assertEqual(actual, expected) |
| 1307 | |
| 1308 | def test_set_extensions(self): |
| 1309 | with open(self.readme_file, "w") as f: |
nothing calls this directly
no test coverage detected