MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / test_mirror_metadata

Function test_mirror_metadata

tests/test_mirror.py:56–72  ·  view source on GitHub ↗
(simulate_mirror)

Source from the content-addressed store, hash-verified

54
55
56def test_mirror_metadata(simulate_mirror):
57 uri = urlparse("mirror://wheel")
58 handler = umirror.MirrorHandler(uri)
59
60 paths = tuple(handler.get_paths())
61 urls = {
62 'https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz',
63 'https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl'
64 }
65
66 for p in paths:
67 url = p.metadata["package"]["info"]["url"]
68 assert url in urls
69 urls.remove(url)
70
71 assert len(urls) == 0
72 assert handler.package.source == "local_mirror"

Callers

nothing calls this directly

Calls 1

get_pathsMethod · 0.95

Tested by

no test coverage detected