Improve tests to use open_order mock where applicable

This commit is contained in:
Matthias
2020-08-13 13:33:45 +02:00
parent 420a8c2b1c
commit ee7b235cdc
3 changed files with 103 additions and 87 deletions

View File

@@ -814,11 +814,10 @@ def test_rpc_count(mocker, default_conf, ticker, fee) -> None:
assert counts["current"] == 1
def test_rpcforcebuy(mocker, default_conf, ticker, fee, limit_buy_order) -> None:
def test_rpcforcebuy(mocker, default_conf, ticker, fee, limit_buy_order_open) -> None:
default_conf['forcebuy_enable'] = True
mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock())
limit_buy_order['status'] = 'open'
buy_mm = MagicMock(return_value=limit_buy_order)
buy_mm = MagicMock(return_value=limit_buy_order_open)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
get_balances=MagicMock(return_value=ticker),