mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve tests for rpc/forcebuy
This commit is contained in:
parent
a66a3d047f
commit
420a8c2b1c
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue
Block a user