This commit is contained in:
Stefano Ariestasia
2022-01-26 07:06:52 +00:00
parent 480ed90a02
commit 1f26709aca
5 changed files with 59 additions and 33 deletions

View File

@@ -109,8 +109,12 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
'open_order': None,
'exchange': 'binance',
'position_adjustment_enable': False,
'filled_buys': {'0': {'amount': 91.07468123, 'average': 1.098e-05,
'cost': 0.0009999999999054, 'order_filled_date': ANY, 'price': 1.098e-05}},
'filled_buys': [{'amount': 91.07468123, 'average': 1.098e-05,
'cost': 0.0009999999999054, 'filled': 91.07468123, 'ft_order_side': 'buy',
'order_date': ANY, 'order_timestamp': ANY, 'order_filled_date': ANY,
'order_filled_timestamp': ANY, 'order_type': 'limit', 'price': 1.098e-05,
'remaining': ANY, 'status': ANY}],
'filled_sells': []
}
mocker.patch('freqtrade.exchange.Exchange.get_rate',
@@ -179,8 +183,12 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
'open_order': None,
'exchange': 'binance',
'position_adjustment_enable': False,
'filled_buys': {'0': {'amount': 91.07468123, 'average': 1.098e-05,
'cost': 0.0009999999999054, 'order_filled_date': ANY, 'price': 1.098e-05}},
'filled_buys': [{'amount': 91.07468123, 'average': 1.098e-05,
'cost': 0.0009999999999054, 'filled': 91.07468123, 'ft_order_side': 'buy',
'order_date': ANY, 'order_timestamp': ANY, 'order_filled_date': ANY,
'order_filled_timestamp': ANY, 'order_type': 'limit', 'price': 1.098e-05,
'remaining': ANY, 'status': ANY}],
'filled_sells': []
}

View File

@@ -201,7 +201,8 @@ def test_telegram_status(default_conf, update, mocker) -> None:
'stoploss_current_dist_ratio': -0.0002,
'stop_loss_ratio': -0.0001,
'open_order': '(limit buy rem=0.00000000)',
'is_open': True
'is_open': True,
'filled_buys': []
}]),
)

View File

@@ -903,7 +903,8 @@ def test_to_json(default_conf, fee):
'buy_tag': None,
'timeframe': None,
'exchange': 'binance',
'filled_buys': {}
'filled_buys': [],
'filled_sells': []
}
# Simulate dry_run entries
@@ -971,7 +972,8 @@ def test_to_json(default_conf, fee):
'buy_tag': 'buys_signal_001',
'timeframe': None,
'exchange': 'binance',
'filled_buys': {}
'filled_buys': [],
'filled_sells': []
}