mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-06 11:32:31 +08:00
Extract helper functions from conftest.py to a dedicated helpers.py module to fix import resolution issues when pytest processes subdirectories. Rename test_tags.py to test_tags_api.py to avoid module name collision with queries/test_tags.py. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15 lines
483 B
Python
15 lines
483 B
Python
"""Helper functions for assets integration tests."""
|
|
import time
|
|
|
|
import requests
|
|
|
|
|
|
def trigger_sync_seed_assets(session: requests.Session, base_url: str) -> None:
|
|
"""Force a fast sync/seed pass by calling the seed endpoint."""
|
|
session.post(base_url + "/api/assets/seed", json={"roots": ["models", "input", "output"]}, timeout=30)
|
|
time.sleep(0.2)
|
|
|
|
|
|
def get_asset_filename(asset_hash: str, extension: str) -> str:
|
|
return asset_hash.removeprefix("blake3:") + extension
|