(self)
| 37 | assert "Unrecognized key in cache" in captured.err |
| 38 | |
| 39 | def test_save_cache(self): |
| 40 | with open(".cache_ggshield", "w") as file: |
| 41 | json.dump({}, file) |
| 42 | cache = Cache() |
| 43 | cache.update_cache(last_found_secrets=[{"match": "XXX"}]) |
| 44 | cache.save() |
| 45 | with open(".cache_ggshield") as file: |
| 46 | file_content = json.load(file) |
| 47 | assert file_content == { |
| 48 | "last_found_secrets": [{"match": "XXX", "name": ""}] |
| 49 | } |
| 50 | |
| 51 | def test_read_only_fs(self): |
| 52 | """ |
nothing calls this directly
no test coverage detected