Files
vllm_agent_strategy/tests/test_download_slot_policy.py

13 lines
472 B
Python
Raw Normal View History

2026-07-21 16:04:18 +08:00
from app.storage.db import connect
from app.storage.repositories import Repository
def test_active_self_download_count(tmp_path):
conn = connect(str(tmp_path / "state.db"))
repo = Repository(conn)
for i in range(8):
repo.upsert_download(f"owner/model-{i}", "HUGGING_FACE", "RUNNING", "self", True)
repo.upsert_download("owner/other", "HUGGING_FACE", "RUNNING", "others", False)
assert repo.count_active_self_downloads() == 8
conn.close()