diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:55:44 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:55:44 +0900 |
| commit | a65575124b18f2ec5d418623e22c5bdef6c3424e (patch) | |
| tree | 2e9f9e2b66083c54adf017c3676d970a6b34d0d5 /services/portfolio-manager/tests/test_snapshot.py | |
| parent | 70a33a5236fd9c3b51b8db0cbaf11376f9817ac5 (diff) | |
feat(portfolio): track realized PnL on sell orders
Diffstat (limited to 'services/portfolio-manager/tests/test_snapshot.py')
| -rw-r--r-- | services/portfolio-manager/tests/test_snapshot.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/portfolio-manager/tests/test_snapshot.py b/services/portfolio-manager/tests/test_snapshot.py index 89d23d7..a464599 100644 --- a/services/portfolio-manager/tests/test_snapshot.py +++ b/services/portfolio-manager/tests/test_snapshot.py @@ -21,6 +21,7 @@ class TestSaveSnapshot: tracker = MagicMock() tracker.get_all_positions.return_value = [pos] + tracker.realized_pnl = Decimal("500") db = AsyncMock() notifier = AsyncMock() @@ -33,7 +34,7 @@ class TestSaveSnapshot: db.insert_portfolio_snapshot.assert_awaited_once_with( total_value=expected_total, - realized_pnl=Decimal("0"), + realized_pnl=Decimal("500"), unrealized_pnl=expected_unrealized, ) notifier.send_daily_summary.assert_awaited_once_with( @@ -51,6 +52,7 @@ class TestSaveSnapshot: tracker = MagicMock() tracker.get_all_positions.return_value = [] + tracker.realized_pnl = Decimal("0") db = AsyncMock() notifier = AsyncMock() |
