2026-06-01 01:18:14 +08:00
|
|
|
from auto_reverse.cli import _parse_args
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_parse_minimal():
|
|
|
|
|
cfg = _parse_args(["https://app.example.com"])
|
|
|
|
|
assert cfg.target_url == "https://app.example.com"
|
2026-06-01 14:44:04 +08:00
|
|
|
assert cfg.model == "openrouter/xiaomi/mimo-v2.5-pro"
|
2026-06-01 01:18:14 +08:00
|
|
|
assert cfg.headless is False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_parse_scope_and_flags():
|
|
|
|
|
cfg = _parse_args(["https://x.com", "--scope", "a.com,b.com", "--headless", "--gen-client"])
|
|
|
|
|
assert cfg.scope_hosts == {"a.com", "b.com"}
|
|
|
|
|
assert cfg.headless is True
|
|
|
|
|
assert cfg.gen_client is True
|