File size: 610 Bytes
4643f62 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | """eval.py helpers."""
from eval import drop_empty_modal_tokens
def test_empty_modal_tokens_are_removed_so_the_modal_setup_login_applies():
# ISSUE-001, found by: all eight v3 evals failing with Modal AuthError "Token missing".
env = {"MODAL_TOKEN_ID": "", "MODAL_TOKEN_SECRET": "", "OTHER": ""}
drop_empty_modal_tokens(env)
assert env == {"OTHER": ""}
def test_real_modal_tokens_are_kept():
env = {"MODAL_TOKEN_ID": "ak-123", "MODAL_TOKEN_SECRET": "as-456"}
drop_empty_modal_tokens(env)
assert env == {"MODAL_TOKEN_ID": "ak-123", "MODAL_TOKEN_SECRET": "as-456"}
|