(fixtures, simulate_mirror, mock_cache)
| 79 | |
| 80 | @pytest.mark.e2e |
| 81 | def test_mirror_cache(fixtures, simulate_mirror, mock_cache): |
| 82 | out = fixtures.get_cli_output(['scan', '--download-only', 'mirror://wheel', '-f', 'json']) |
| 83 | |
| 84 | parsed_output = json.loads(out.stdout) |
| 85 | assert len(parsed_output["detections"]) == 0 |
| 86 | |
| 87 | cache_content = [ |
| 88 | x.item_path.name |
| 89 | for x in cache.CacheItem.iter_items() |
| 90 | ] |
| 91 | |
| 92 | assert len(cache_content) > 0 |
| 93 | assert "mirror_wheel-0.34.2.tar.gz" in cache_content, cache_content |
| 94 | assert "mirror_wheel-0.34.2-py2.py3-none-any.whl" in cache_content |
| 95 | |
| 96 | |
| 97 | @pytest.mark.parametrize("file_path", ( |
nothing calls this directly
no test coverage detected