MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / test_mirror_cache

Function test_mirror_cache

tests/test_cache.py:81–94  ·  view source on GitHub ↗
(fixtures, simulate_mirror, mock_cache)

Source from the content-addressed store, hash-verified

79
80@pytest.mark.e2e
81def 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", (

Callers

nothing calls this directly

Calls 2

get_cli_outputMethod · 0.80
iter_itemsMethod · 0.80

Tested by

no test coverage detected