Adjust tests for new messageType handling

This commit is contained in:
Matthias 2022-09-20 20:31:06 +02:00
parent 3b0874eb37
commit ff36431680
2 changed files with 14 additions and 6 deletions

View File

@ -959,6 +959,7 @@ def test_telegram_forceexit_handle(default_conf, update, ticker, fee,
'gain': 'profit',
'leverage': 1.0,
'limit': 1.173e-05,
'order_rate': 1.173e-05,
'amount': 91.07468123,
'order_type': 'limit',
'open_rate': 1.098e-05,
@ -1031,6 +1032,7 @@ def test_telegram_force_exit_down_handle(default_conf, update, ticker, fee,
'gain': 'loss',
'leverage': 1.0,
'limit': 1.043e-05,
'order_rate': 1.043e-05,
'amount': 91.07468123,
'order_type': 'limit',
'open_rate': 1.098e-05,
@ -1092,6 +1094,7 @@ def test_forceexit_all_handle(default_conf, update, ticker, fee, mocker) -> None
'pair': 'ETH/BTC',
'gain': 'loss',
'leverage': 1.0,
'order_rate': 1.099e-05,
'limit': 1.099e-05,
'amount': 91.07468123,
'order_type': 'limit',
@ -1744,7 +1747,7 @@ def test_send_msg_enter_notification(default_conf, mocker, caplog, message_type,
'exchange': 'Binance',
'pair': 'ETH/BTC',
'leverage': leverage,
'limit': 1.099e-05,
'open_rate': 1.099e-05,
'order_type': 'limit',
'direction': enter,
'stake_amount': 0.01465333,
@ -1915,7 +1918,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
'leverage': 1.0,
'direction': 'Long',
'gain': 'loss',
'limit': 3.201e-05,
'order_rate': 3.201e-05,
'amount': 1333.3333333333335,
'order_type': 'market',
'open_rate': 7.5e-05,
@ -1950,7 +1953,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
'pair': 'KEY/ETH',
'direction': 'Long',
'gain': 'loss',
'limit': 3.201e-05,
'order_rate': 3.201e-05,
'amount': 1333.3333333333335,
'order_type': 'market',
'open_rate': 7.5e-05,
@ -1989,7 +1992,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
'pair': 'KEY/ETH',
'direction': 'Long',
'gain': 'loss',
'limit': 3.201e-05,
'order_rate': 3.201e-05,
'amount': 1333.3333333333335,
'order_type': 'market',
'open_rate': 7.5e-05,
@ -2162,7 +2165,7 @@ def test_send_msg_buy_notification_no_fiat(
'exchange': 'Binance',
'pair': 'ETH/BTC',
'leverage': leverage,
'limit': 1.099e-05,
'open_rate': 1.099e-05,
'order_type': 'limit',
'direction': enter,
'stake_amount': 0.01465333,
@ -2205,7 +2208,7 @@ def test_send_msg_sell_notification_no_fiat(
'gain': 'loss',
'leverage': leverage,
'direction': direction,
'limit': 3.201e-05,
'order_rate': 3.201e-05,
'amount': 1333.3333333333335,
'order_type': 'limit',
'open_rate': 7.5e-05,

View File

@ -3256,6 +3256,7 @@ def test_execute_trade_exit_up(default_conf_usdt, ticker_usdt, fee, ticker_usdt_
'pair': 'ETH/USDT',
'gain': 'profit',
'limit': 2.0 if is_short else 2.2,
'order_rate': 2.0 if is_short else 2.2,
'amount': pytest.approx(amt),
'order_type': 'limit',
'buy_tag': None,
@ -3321,6 +3322,7 @@ def test_execute_trade_exit_down(default_conf_usdt, ticker_usdt, fee, ticker_usd
'leverage': 1.0,
'gain': 'loss',
'limit': 2.2 if is_short else 2.01,
'order_rate': 2.2 if is_short else 2.01,
'amount': pytest.approx(29.70297029) if is_short else 30.0,
'order_type': 'limit',
'buy_tag': None,
@ -3405,6 +3407,7 @@ def test_execute_trade_exit_custom_exit_price(
'leverage': 1.0,
'gain': profit_or_loss,
'limit': limit,
'order_rate': limit,
'amount': pytest.approx(amount),
'order_type': 'limit',
'buy_tag': None,
@ -3476,6 +3479,7 @@ def test_execute_trade_exit_down_stoploss_on_exchange_dry_run(
'leverage': 1.0,
'gain': 'loss',
'limit': 2.02 if is_short else 1.98,
'order_rate': 2.02 if is_short else 1.98,
'amount': pytest.approx(29.70297029 if is_short else 30.0),
'order_type': 'limit',
'buy_tag': None,
@ -3741,6 +3745,7 @@ def test_execute_trade_exit_market_order(
'leverage': 1.0,
'gain': profit_or_loss,
'limit': limit,
'order_rate': limit,
'amount': pytest.approx(amount),
'order_type': 'market',
'buy_tag': None,