summaryrefslogtreecommitdiff
path: root/services/strategy-engine/tests/test_moc_strategy.py
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 15:54:55 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 15:54:55 +0900
commitbf4afbc0a3cc4e847ef01840365fd6a6ae9c142f (patch)
treec8634b3b21534f550e2d255d98c4a068a1b567d0 /services/strategy-engine/tests/test_moc_strategy.py
parentec8b6fea5a4a710df4b2ae18f3f399d165c8ffd4 (diff)
style: auto-fix lint violations from enhanced ruff rules
Diffstat (limited to 'services/strategy-engine/tests/test_moc_strategy.py')
-rw-r--r--services/strategy-engine/tests/test_moc_strategy.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/strategy-engine/tests/test_moc_strategy.py b/services/strategy-engine/tests/test_moc_strategy.py
index 1928a28..076e846 100644
--- a/services/strategy-engine/tests/test_moc_strategy.py
+++ b/services/strategy-engine/tests/test_moc_strategy.py
@@ -5,19 +5,20 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
-from datetime import datetime, timezone
+from datetime import UTC, datetime
from decimal import Decimal
-from shared.models import Candle, OrderSide
from strategies.moc_strategy import MocStrategy
+from shared.models import Candle, OrderSide
+
def _candle(price, hour=20, minute=0, volume=100.0, day=1, open_price=None):
op = open_price if open_price is not None else price - 1 # Default: bullish
return Candle(
symbol="AAPL",
timeframe="5Min",
- open_time=datetime(2025, 1, day, hour, minute, tzinfo=timezone.utc),
+ open_time=datetime(2025, 1, day, hour, minute, tzinfo=UTC),
open=Decimal(str(op)),
high=Decimal(str(price + 1)),
low=Decimal(str(min(op, price) - 1)),