Adjust tests to use correctly trimmed amount

This commit is contained in:
Matthias
2020-07-15 20:51:52 +02:00
parent 3721736aaf
commit 98f2e79f27
5 changed files with 24 additions and 24 deletions

View File

@@ -690,7 +690,7 @@ def test_reload_config_handle(default_conf, update, mocker) -> None:
assert 'reloading config' in msg_mock.call_args_list[0][0][0]
def test_forcesell_handle(default_conf, update, ticker, fee,
def test_telegram_forcesell_handle(default_conf, update, ticker, fee,
ticker_sell_up, mocker) -> None:
mocker.patch('freqtrade.rpc.rpc.CryptoToFiatConverter._find_price', return_value=15000.0)
rpc_mock = mocker.patch('freqtrade.rpc.telegram.Telegram.send_msg', MagicMock())
@@ -729,7 +729,7 @@ def test_forcesell_handle(default_conf, update, ticker, fee,
'pair': 'ETH/BTC',
'gain': 'profit',
'limit': 1.173e-05,
'amount': 91.07468123861567,
'amount': 91.07468123,
'order_type': 'limit',
'open_rate': 1.098e-05,
'current_rate': 1.173e-05,
@@ -743,8 +743,8 @@ def test_forcesell_handle(default_conf, update, ticker, fee,
} == last_msg
def test_forcesell_down_handle(default_conf, update, ticker, fee,
ticker_sell_down, mocker) -> None:
def test_telegram_forcesell_down_handle(default_conf, update, ticker, fee,
ticker_sell_down, mocker) -> None:
mocker.patch('freqtrade.rpc.fiat_convert.CryptoToFiatConverter._find_price',
return_value=15000.0)
rpc_mock = mocker.patch('freqtrade.rpc.telegram.Telegram.send_msg', MagicMock())
@@ -788,7 +788,7 @@ def test_forcesell_down_handle(default_conf, update, ticker, fee,
'pair': 'ETH/BTC',
'gain': 'loss',
'limit': 1.043e-05,
'amount': 91.07468123861567,
'amount': 91.07468123,
'order_type': 'limit',
'open_rate': 1.098e-05,
'current_rate': 1.043e-05,
@@ -836,7 +836,7 @@ def test_forcesell_all_handle(default_conf, update, ticker, fee, mocker) -> None
'pair': 'ETH/BTC',
'gain': 'loss',
'limit': 1.099e-05,
'amount': 91.07468123861567,
'amount': 91.07468123,
'order_type': 'limit',
'open_rate': 1.098e-05,
'current_rate': 1.099e-05,