feat: REQ-028 add display_name to GET /v1/portfolios response
- Portfolio domain model + PortfolioItem schema에 display_name 필드 추가 - _SELECT_PORTFOLIO에 a.display_name JOIN 보강, _portfolio_to_item 매퍼 전달 - REQ-028 CHG-20260601-01/02: Implemented → Approved → Implemented - AC-13 신설 (display_name == joined assets.display_name) - BAT-009 verification.md: AC-13 매핑 + augmentation history 누적 - REL-001 verification checklist 재실행 evidence 갱신 (368 PASSED, 로컬 smoke 5건 통과) - tests/test_v1.py: dead 중복 GET /v1/assets 섹션 제거 (두 번째 동명 정의가 첫 번째를 override하던 잔재) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -26,8 +26,14 @@ def _make_settings(**kwargs) -> Settings:
|
||||
return Settings(allowed_origins_raw="http://localhost:3000", **kwargs)
|
||||
|
||||
|
||||
def _make_asset(markets: list[str] | None = None) -> Asset:
|
||||
return Asset(asset_id=_ASSET_UUID, symbol="005930", markets=markets or ["KRX"], status="active")
|
||||
def _make_asset(markets: list[str] | None = None, display_name: str | None = "삼성전자") -> Asset:
|
||||
return Asset(
|
||||
asset_id=_ASSET_UUID,
|
||||
symbol="005930",
|
||||
markets=markets or ["KRX"],
|
||||
display_name=display_name,
|
||||
status="active",
|
||||
)
|
||||
|
||||
|
||||
def _make_portfolio(
|
||||
@@ -35,6 +41,7 @@ def _make_portfolio(
|
||||
owner: str = _USER_ID,
|
||||
status: str = "enabled",
|
||||
daemon_id: str | None = None,
|
||||
display_name: str | None = "삼성전자",
|
||||
) -> Portfolio:
|
||||
return Portfolio(
|
||||
portfolio_id=portfolio_id,
|
||||
@@ -42,6 +49,7 @@ def _make_portfolio(
|
||||
status=status,
|
||||
name=f"p-{portfolio_id[:4]}",
|
||||
symbol="005930",
|
||||
display_name=display_name,
|
||||
asset_id=_ASSET_UUID,
|
||||
owner_user_id=owner,
|
||||
cash_balance=0.0,
|
||||
|
||||
Reference in New Issue
Block a user