summaryrefslogtreecommitdiff
path: root/services/data-collector/tests
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 16:24:30 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-01 16:24:30 +0900
commit100aa624ad3f8ad466a95f9da8af30f31f77cc9c (patch)
treeef81b9f37872ed462a1f84ea238a130f758782d2 /services/data-collector/tests
parent73eaf704584e5bf3c4499ccdd574af87304e1e5f (diff)
fix: resolve lint issues and final integration fixes
- Fix ambiguous variable name in binance_rest.py - Remove unused volumes variable in volume_profile_strategy.py - Fix import ordering in backtester main.py and test_metrics.py - Auto-format all files with ruff
Diffstat (limited to 'services/data-collector/tests')
-rw-r--r--services/data-collector/tests/test_binance_rest.py13
-rw-r--r--services/data-collector/tests/test_storage.py1
2 files changed, 5 insertions, 9 deletions
diff --git a/services/data-collector/tests/test_binance_rest.py b/services/data-collector/tests/test_binance_rest.py
index 695dcf9..bf88210 100644
--- a/services/data-collector/tests/test_binance_rest.py
+++ b/services/data-collector/tests/test_binance_rest.py
@@ -1,4 +1,5 @@
"""Tests for binance_rest module."""
+
import pytest
from decimal import Decimal
from unittest.mock import AsyncMock, MagicMock
@@ -19,9 +20,7 @@ async def test_fetch_historical_candles_parses_response():
]
)
- candles = await fetch_historical_candles(
- mock_exchange, "BTC/USDT", "1m", since=ts, limit=500
- )
+ candles = await fetch_historical_candles(mock_exchange, "BTC/USDT", "1m", since=ts, limit=500)
assert len(candles) == 2
@@ -35,9 +34,7 @@ async def test_fetch_historical_candles_parses_response():
assert c.close == Decimal("30050.0")
assert c.volume == Decimal("1.5")
- mock_exchange.fetch_ohlcv.assert_called_once_with(
- "BTC/USDT", "1m", since=ts, limit=500
- )
+ mock_exchange.fetch_ohlcv.assert_called_once_with("BTC/USDT", "1m", since=ts, limit=500)
@pytest.mark.asyncio
@@ -46,8 +43,6 @@ async def test_fetch_historical_candles_empty_response():
mock_exchange = MagicMock()
mock_exchange.fetch_ohlcv = AsyncMock(return_value=[])
- candles = await fetch_historical_candles(
- mock_exchange, "BTC/USDT", "1m", since=1700000000000
- )
+ candles = await fetch_historical_candles(mock_exchange, "BTC/USDT", "1m", since=1700000000000)
assert candles == []
diff --git a/services/data-collector/tests/test_storage.py b/services/data-collector/tests/test_storage.py
index 6b27414..be85578 100644
--- a/services/data-collector/tests/test_storage.py
+++ b/services/data-collector/tests/test_storage.py
@@ -1,4 +1,5 @@
"""Tests for storage module."""
+
import pytest
from decimal import Decimal
from datetime import datetime, timezone