Improve tests for rpc/forcebuy

This commit is contained in:
Matthias 2020-08-13 11:36:58 +02:00
parent a66a3d047f
commit 420a8c2b1c
2 changed files with 3 additions and 1 deletions

View File

@ -827,6 +827,7 @@ def limit_buy_order():
'side': 'buy',
'symbol': 'mocked',
'datetime': arrow.utcnow().isoformat(),
'timestamp': arrow.utcnow().timestamp,
'price': 0.00001099,
'amount': 90.99181073,
'filled': 90.99181073,

View File

@ -817,7 +817,8 @@ def test_rpc_count(mocker, default_conf, ticker, fee) -> None:
def test_rpcforcebuy(mocker, default_conf, ticker, fee, limit_buy_order) -> None:
default_conf['forcebuy_enable'] = True
mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock())
buy_mm = MagicMock(return_value={'id': limit_buy_order['id']})
limit_buy_order['status'] = 'open'
buy_mm = MagicMock(return_value=limit_buy_order)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
get_balances=MagicMock(return_value=ticker),