feat(DATA-004): add underlying instrument selector
This commit is contained in:
@@ -4,6 +4,23 @@ from app.models.portfolio import PortfolioConfig
|
||||
from app.pages.settings import _save_card_status_text
|
||||
|
||||
|
||||
def test_portfolio_config_underlying_defaults_to_gld() -> None:
|
||||
"""Verify PortfolioConfig underlying field defaults to GLD."""
|
||||
config = PortfolioConfig(gold_value=215_000.0, entry_price=215.0, loan_amount=145_000.0)
|
||||
assert config.underlying == "GLD"
|
||||
|
||||
|
||||
def test_portfolio_config_underlying_can_be_set_to_gc_f() -> None:
|
||||
"""Verify PortfolioConfig underlying can be set to GC=F."""
|
||||
config = PortfolioConfig(
|
||||
gold_value=215_000.0,
|
||||
entry_price=215.0,
|
||||
loan_amount=145_000.0,
|
||||
underlying="GC=F",
|
||||
)
|
||||
assert config.underlying == "GC=F"
|
||||
|
||||
|
||||
def test_save_card_status_text_for_clean_state() -> None:
|
||||
config = PortfolioConfig(gold_value=215_000.0, entry_price=215.0, loan_amount=145_000.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user