(self)
| 1261 | ) |
| 1262 | |
| 1263 | def test_add_fields(self): |
| 1264 | with open(self.readme_file, "w") as f: |
| 1265 | json.dump({"foo": "bar"}, f) |
| 1266 | |
| 1267 | kwargs = dict( |
| 1268 | extensions=None, outputsubfolder="foo", numberofrules=5, sourcesdata="hosts", nounifiedhosts=False |
| 1269 | ) |
| 1270 | update_readme_data(self.readme_file, **kwargs) |
| 1271 | |
| 1272 | if platform.system().lower() == "windows": |
| 1273 | sep = "/" |
| 1274 | else: |
| 1275 | sep = self.sep |
| 1276 | |
| 1277 | expected = { |
| 1278 | "base": {"location": "foo" + sep, 'nounifiedhosts': False, "sourcesdata": "hosts", "entries": 5}, |
| 1279 | "foo": "bar", |
| 1280 | } |
| 1281 | |
| 1282 | with open(self.readme_file, "r") as f: |
| 1283 | actual = json.load(f) |
| 1284 | self.assertEqual(actual, expected) |
| 1285 | |
| 1286 | def test_modify_fields(self): |
| 1287 | with open(self.readme_file, "w") as f: |
nothing calls this directly
no test coverage detected