diff options
Diffstat (limited to 'tests/integration/test_strategy_signal_flow.py')
| -rw-r--r-- | tests/integration/test_strategy_signal_flow.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/integration/test_strategy_signal_flow.py b/tests/integration/test_strategy_signal_flow.py index 448329f..3f7ec35 100644 --- a/tests/integration/test_strategy_signal_flow.py +++ b/tests/integration/test_strategy_signal_flow.py @@ -8,15 +8,16 @@ sys.path.insert( ) sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "services" / "strategy-engine")) -import pytest +from datetime import UTC, datetime from decimal import Decimal -from datetime import datetime, timezone from unittest.mock import AsyncMock -from shared.models import Candle -from shared.events import CandleEvent +import pytest from strategy_engine.engine import StrategyEngine +from shared.events import CandleEvent +from shared.models import Candle + @pytest.fixture def candles(): @@ -26,9 +27,9 @@ def candles(): price = Decimal(str(100 - i * 2)) # 100, 98, 96... base.append( Candle( - symbol="BTCUSDT", + symbol="AAPL", timeframe="1m", - open_time=datetime(2025, 1, 1, i, 0, tzinfo=timezone.utc), + open_time=datetime(2025, 1, 1, i, 0, tzinfo=UTC), open=price, high=price + 1, low=price - 1, @@ -54,7 +55,7 @@ async def test_strategy_engine_produces_signals_from_candles(candles): engine = StrategyEngine(broker=broker, strategies=[strategy]) - await engine.process_once("candles.BTCUSDT", "$") + await engine.process_once("candles.AAPL", "$") # With 20 declining candles (100->62), RSI should be very low # Check if broker.publish was called with a signal |
