Local changes: Updated model training, removed debug instrumentation, and configuration improvements
This commit is contained in:
31
tests/integration/test_portfolio_tracking.py
Normal file
31
tests/integration/test_portfolio_tracking.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""Integration tests for portfolio tracking."""
|
||||
|
||||
import pytest
|
||||
from decimal import Decimal
|
||||
from src.portfolio.tracker import get_portfolio_tracker
|
||||
from src.trading.paper_trading import get_paper_trading
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
class TestPortfolioTracking:
|
||||
"""Integration tests for portfolio tracking."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_portfolio_tracking_workflow(self):
|
||||
"""Test portfolio tracking workflow."""
|
||||
tracker = get_portfolio_tracker()
|
||||
paper_trading = get_paper_trading()
|
||||
|
||||
# Get initial portfolio
|
||||
portfolio1 = await tracker.get_current_portfolio(paper_trading=True)
|
||||
|
||||
# Portfolio should have structure
|
||||
assert "positions" in portfolio1
|
||||
assert "performance" in portfolio1
|
||||
|
||||
# Get updated portfolio
|
||||
portfolio2 = await tracker.get_current_portfolio(paper_trading=True)
|
||||
|
||||
# Should return valid portfolio
|
||||
assert portfolio2 is not None
|
||||
|
||||
Reference in New Issue
Block a user