MCPcopy
hub / github.com/AstrBotDevs/AstrBot / mock_download_dashboard

Function mock_download_dashboard

tests/test_dashboard.py:2725–2732  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

2723 os.makedirs(release_path, exist_ok=True)
2724
2725 async def mock_download_dashboard(*args, **kwargs):
2726 calls.append("download-dashboard")
2727 callback = kwargs.get("progress_callback")
2728 if callback:
2729 callback({"downloaded": 10, "total": 10, "percent": 1, "speed": 1})
2730 with zipfile.ZipFile(kwargs["path"], "w") as zf:
2731 zf.writestr("dist/index.html", "dashboard")
2732 return
2733
2734 def mock_extract_dashboard(*args, **kwargs):
2735 del args, kwargs

Callers

nothing calls this directly

Calls 3

appendMethod · 0.45
getMethod · 0.45
write_bytesMethod · 0.45

Tested by

no test coverage detected