Fix remaining arrow testcases

This commit is contained in:
Matthias
2023-05-14 18:31:09 +02:00
parent 3ec55885bd
commit 261822147c
12 changed files with 56 additions and 66 deletions
+14 -15
View File
@@ -8,7 +8,6 @@ from pathlib import Path
from typing import Optional
from unittest.mock import MagicMock, Mock, PropertyMock
import arrow
import numpy as np
import pandas as pd
import pytest
@@ -1693,8 +1692,8 @@ def limit_buy_order_old():
'type': 'limit',
'side': 'buy',
'symbol': 'mocked',
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': (dt_now() - timedelta(minutes=601)).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'price': 0.00001099,
'amount': 90.99181073,
'filled': 0.0,
@@ -1710,8 +1709,8 @@ def limit_sell_order_old():
'type': 'limit',
'side': 'sell',
'symbol': 'ETH/BTC',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'datetime': (dt_now() - timedelta(minutes=601)).isoformat(),
'price': 0.00001099,
'amount': 90.99181073,
'filled': 0.0,
@@ -1727,8 +1726,8 @@ def limit_buy_order_old_partial():
'type': 'limit',
'side': 'buy',
'symbol': 'ETH/BTC',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'datetime': (dt_now() - timedelta(minutes=601)).isoformat(),
'price': 0.00001099,
'amount': 90.99181073,
'filled': 23.0,
@@ -1758,8 +1757,8 @@ def limit_buy_order_canceled_empty(request):
'info': {},
'id': 'AZNPFF-4AC4N-7MKTAT',
'clientOrderId': None,
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'datetime': dt_now() - timedelta(minutes=601).isoformat(),
'lastTradeTimestamp': None,
'status': 'canceled',
'symbol': 'LTC/USDT',
@@ -1779,8 +1778,8 @@ def limit_buy_order_canceled_empty(request):
'info': {},
'id': '1234512345',
'clientOrderId': 'alb1234123',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'datetime': dt_now() - timedelta(minutes=601).isoformat(),
'lastTradeTimestamp': None,
'symbol': 'LTC/USDT',
'type': 'limit',
@@ -1800,8 +1799,8 @@ def limit_buy_order_canceled_empty(request):
'info': {},
'id': '1234512345',
'clientOrderId': 'alb1234123',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'datetime': (dt_now() - timedelta(minutes=601)).isoformat(),
'lastTradeTimestamp': None,
'symbol': 'LTC/USDT',
'type': 'limit',
@@ -2488,8 +2487,8 @@ def buy_order_fee():
'type': 'limit',
'side': 'buy',
'symbol': 'mocked',
'timestamp': arrow.utcnow().shift(minutes=-601).int_timestamp * 1000,
'datetime': arrow.utcnow().shift(minutes=-601).isoformat(),
'timestamp': dt_ts(dt_now() - timedelta(minutes=601)),
'datetime': (dt_now() - timedelta(minutes=601)).isoformat(),
'price': 0.245441,
'amount': 8.0,
'cost': 1.963528,