summaryrefslogtreecommitdiff
path: root/shared/tests/test_db.py
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 10:26:52 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 10:26:52 +0900
commit53cadcf7e34f05f77082e84f0696b56bcbcbae36 (patch)
treee02650e10c4d5727bc1e32e27788c17327fa46f7 /shared/tests/test_db.py
parentf5521da2876a2c19afc24f370b3258f2be95f81a (diff)
refactor: remove all crypto/Binance code, update to US stock symbols
Diffstat (limited to 'shared/tests/test_db.py')
-rw-r--r--shared/tests/test_db.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared/tests/test_db.py b/shared/tests/test_db.py
index d33dfe1..239ee64 100644
--- a/shared/tests/test_db.py
+++ b/shared/tests/test_db.py
@@ -10,7 +10,7 @@ def make_candle():
from shared.models import Candle
return Candle(
- symbol="BTCUSDT",
+ symbol="AAPL",
timeframe="1m",
open_time=datetime(2024, 1, 1, tzinfo=timezone.utc),
open=Decimal("50000"),
@@ -27,7 +27,7 @@ def make_signal():
return Signal(
id="sig-1",
strategy="ma_cross",
- symbol="BTCUSDT",
+ symbol="AAPL",
side=OrderSide.BUY,
price=Decimal("50000"),
quantity=Decimal("0.1"),
@@ -42,7 +42,7 @@ def make_order():
return Order(
id="ord-1",
signal_id="sig-1",
- symbol="BTCUSDT",
+ symbol="AAPL",
side=OrderSide.BUY,
type=OrderType.LIMIT,
price=Decimal("50000"),
@@ -228,7 +228,7 @@ class TestGetCandles:
# Create a mock row that behaves like a SA result row
mock_row = MagicMock()
mock_row._mapping = {
- "symbol": "BTCUSDT",
+ "symbol": "AAPL",
"timeframe": "1m",
"open_time": datetime(2024, 1, 1, tzinfo=timezone.utc),
"open": Decimal("50000"),
@@ -248,11 +248,11 @@ class TestGetCandles:
db._session_factory = MagicMock(return_value=mock_session)
- result = await db.get_candles("BTCUSDT", "1m", 500)
+ result = await db.get_candles("AAPL", "1m", 500)
assert isinstance(result, list)
assert len(result) == 1
- assert result[0]["symbol"] == "BTCUSDT"
+ assert result[0]["symbol"] == "AAPL"
mock_session.execute.assert_awaited_once()