feat: add advisor demo environment bootstrap
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
||||
from tools.bootstrap_advisor_demo import build_steps, validate_args
|
||||
from tools.publish_advisor_demo_config import INTENT_TOOLS
|
||||
|
||||
|
||||
def test_demo_bootstrap_requires_explicit_database_confirmation() -> None:
|
||||
args = argparse.Namespace(
|
||||
apply=True,
|
||||
confirm_demo_database=False,
|
||||
suitability_csv=None,
|
||||
contracts_csv=None,
|
||||
market_days=400,
|
||||
skip_market_sync=False,
|
||||
)
|
||||
|
||||
assert validate_args(args) == "--apply requires --confirm-demo-database"
|
||||
|
||||
|
||||
def test_demo_bootstrap_adds_evidence_and_market_steps() -> None:
|
||||
args = argparse.Namespace(
|
||||
apply=False,
|
||||
confirm_demo_database=False,
|
||||
suitability_csv=None,
|
||||
contracts_csv=None,
|
||||
market_days=400,
|
||||
skip_market_sync=False,
|
||||
)
|
||||
|
||||
labels = [step.label for step in build_steps(args)]
|
||||
|
||||
assert "Refresh market history and quality snapshots" in labels
|
||||
assert "Publish advisor tool allowlist" in labels
|
||||
assert labels.index("Seed baseline demo RBAC") < labels.index(
|
||||
"Create advisor role and permissions"
|
||||
)
|
||||
|
||||
|
||||
def test_advisor_tool_release_covers_every_supported_intent() -> None:
|
||||
assert set(INTENT_TOOLS) == {
|
||||
"fund_quote",
|
||||
"investment_goal",
|
||||
"portfolio_analysis",
|
||||
"asset_allocation",
|
||||
"product_recommend",
|
||||
"comparison",
|
||||
}
|
||||
Reference in New Issue
Block a user