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:
@@ -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
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user