diff options
Diffstat (limited to 'services/strategy-engine/tests/test_multi_symbol.py')
| -rw-r--r-- | services/strategy-engine/tests/test_multi_symbol.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/services/strategy-engine/tests/test_multi_symbol.py b/services/strategy-engine/tests/test_multi_symbol.py index 2008c15..cb8088c 100644 --- a/services/strategy-engine/tests/test_multi_symbol.py +++ b/services/strategy-engine/tests/test_multi_symbol.py @@ -1,5 +1,5 @@ """Test that strategy engine processes multiple symbols concurrently.""" -import asyncio + import sys from pathlib import Path from unittest.mock import AsyncMock, MagicMock @@ -11,7 +11,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from strategy_engine.engine import StrategyEngine from shared.events import CandleEvent -from shared.models import Candle, OrderSide +from shared.models import Candle from decimal import Decimal from datetime import datetime, timezone @@ -22,17 +22,23 @@ async def test_engine_processes_multiple_streams(): broker = AsyncMock() candle_btc = Candle( - symbol="BTCUSDT", timeframe="1m", + symbol="BTCUSDT", + timeframe="1m", open_time=datetime(2025, 1, 1, tzinfo=timezone.utc), - open=Decimal("50000"), high=Decimal("51000"), - low=Decimal("49000"), close=Decimal("50000"), + open=Decimal("50000"), + high=Decimal("51000"), + low=Decimal("49000"), + close=Decimal("50000"), volume=Decimal("10"), ) candle_eth = Candle( - symbol="ETHUSDT", timeframe="1m", + symbol="ETHUSDT", + timeframe="1m", open_time=datetime(2025, 1, 1, tzinfo=timezone.utc), - open=Decimal("3000"), high=Decimal("3100"), - low=Decimal("2900"), close=Decimal("3000"), + open=Decimal("3000"), + high=Decimal("3100"), + low=Decimal("2900"), + close=Decimal("3000"), volume=Decimal("10"), ) |
