agentic-space-factory-UI-public / tests /test_hardware_strategy_payload.py
fffiloni's picture
Upload 116 files
94713cb verified
Raw
History Blame
1.07 kB
from src.worker_payload import UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
def test_hardware_requested_at_space_creation_first():
assert "space_hardware=hardware" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert "create_space_with_hardware_strategy" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert "create_repo_space_hardware_first" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
def test_post_create_hardware_retry_stops_on_auth_errors():
assert "is_auth_or_billing_like_error" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert "401" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert "manual_action_required" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
def test_auto_generated_space_collision_retries_with_fresh_target():
assert "TARGET_SPACE_AUTO_GENERATED" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert "target_space_collision" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert "allow_auto_rename=target_space_auto_generated" in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT
assert 'target_space_id = hardware_strategy.get("target_space_id")' in UNIVERSAL_MODEL_CARD_WORKER_SCRIPT