feat(REQ-006): implement v1 assets endpoint with verification

- Add v1_assets.py API endpoint for asset list retrieval
- Add AssetResponse schema to v1.py
- Implement comprehensive test coverage in test_v1.py
- Update requirement verification with implementation evidence
- Update SRS index to mark REQ-006 as Implemented
- Document acceptance criteria validation results
This commit is contained in:
2026-05-03 13:36:27 +00:00
parent 222c66bb7f
commit 545d4da413
6 changed files with 62 additions and 8 deletions
+3
View File
@@ -177,6 +177,7 @@ def test_v1_assets_returns_asset_list(monkeypatch) -> None:
assert item["cash"] == 1000.0
assert item["quantity"] == 10.0
assert item["strategy_params"] == {}
assert item["strategy_type"] is None
def test_v1_assets_status_filter(monkeypatch) -> None:
@@ -239,6 +240,7 @@ def test_v1_assets_strategy_params(monkeypatch) -> None:
assert resp.status_code == 200
assert resp.json()["assets"][0]["strategy_params"] == {"buy_threshold": 0.05}
assert resp.json()["assets"][0]["strategy_type"] == "strategy"
def test_v1_assets_strategy_params_fallback_on_error(monkeypatch) -> None:
@@ -267,6 +269,7 @@ def test_v1_assets_strategy_params_fallback_on_error(monkeypatch) -> None:
assert resp.status_code == 200
assert resp.json()["assets"][0]["strategy_params"] == {}
assert resp.json()["assets"][0]["strategy_type"] is None
# ---------------------------------------------------------------------------