Local changes: Updated model training, removed debug instrumentation, and configuration improvements
This commit is contained in:
34
tests/e2e/test_strategy_lifecycle.py
Normal file
34
tests/e2e/test_strategy_lifecycle.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""End-to-end tests for strategy lifecycle."""
|
||||
|
||||
import pytest
|
||||
from src.strategies.technical.rsi_strategy import RSIStrategy
|
||||
from src.trading.engine import get_trading_engine
|
||||
|
||||
|
||||
@pytest.mark.e2e
|
||||
class TestStrategyLifecycle:
|
||||
"""End-to-end tests for strategy lifecycle."""
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_strategy_lifecycle(self):
|
||||
"""Test complete strategy lifecycle."""
|
||||
engine = get_trading_engine()
|
||||
await engine.initialize()
|
||||
|
||||
# Create strategy
|
||||
strategy = RSIStrategy(
|
||||
strategy_id=1,
|
||||
name="test_rsi",
|
||||
symbol="BTC/USD",
|
||||
timeframe="1h",
|
||||
parameters={"rsi_period": 14}
|
||||
)
|
||||
|
||||
# Start
|
||||
await engine.start_strategy(strategy)
|
||||
|
||||
# Stop
|
||||
await engine.stop_strategy(1)
|
||||
|
||||
await engine.shutdown()
|
||||
|
||||
Reference in New Issue
Block a user