fixed failing test_execute_trade_exit_custom_exit_price
This commit is contained in:
parent
5fbe76cd7e
commit
962f63a19a
@ -2929,9 +2929,14 @@ def test_execute_trade_exit_down(default_conf_usdt, ticker_usdt, fee, ticker_usd
|
|||||||
} == last_msg
|
} == last_msg
|
||||||
|
|
||||||
|
|
||||||
@ pytest.mark.parametrize("is_short", [False, True])
|
@pytest.mark.parametrize(
|
||||||
def test_execute_trade_exit_custom_exit_price(default_conf_usdt, ticker_usdt, fee,
|
"is_short,amount,open_rate,current_rate,limit,profit_amount,profit_ratio,profit_or_loss", [
|
||||||
ticker_usdt_sell_up, is_short, mocker) -> None:
|
(False, 30, 2.0, 2.3, 2.25, 7.18125, 0.11938903, 'profit'),
|
||||||
|
(True, 29.70297029, 2.02, 2.2, 2.25, -7.14876237, -0.11944465, 'loss'), # TODO-lev
|
||||||
|
])
|
||||||
|
def test_execute_trade_exit_custom_exit_price(
|
||||||
|
default_conf_usdt, ticker_usdt, fee, ticker_usdt_sell_up, is_short, amount, open_rate,
|
||||||
|
current_rate, limit, profit_amount, profit_ratio, profit_or_loss, mocker) -> None:
|
||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
patch_exchange(mocker)
|
patch_exchange(mocker)
|
||||||
mocker.patch.multiple(
|
mocker.patch.multiple(
|
||||||
@ -2981,14 +2986,14 @@ def test_execute_trade_exit_custom_exit_price(default_conf_usdt, ticker_usdt, fe
|
|||||||
'type': RPCMessageType.SELL,
|
'type': RPCMessageType.SELL,
|
||||||
'exchange': 'Binance',
|
'exchange': 'Binance',
|
||||||
'pair': 'ETH/USDT',
|
'pair': 'ETH/USDT',
|
||||||
'gain': 'profit',
|
'gain': profit_or_loss,
|
||||||
'limit': 2.25,
|
'limit': limit,
|
||||||
'amount': 30.0,
|
'amount': amount,
|
||||||
'order_type': 'limit',
|
'order_type': 'limit',
|
||||||
'open_rate': 2.0,
|
'open_rate': open_rate,
|
||||||
'current_rate': 2.3,
|
'current_rate': current_rate,
|
||||||
'profit_amount': 7.18125,
|
'profit_amount': profit_amount,
|
||||||
'profit_ratio': 0.11938903,
|
'profit_ratio': profit_ratio,
|
||||||
'stake_currency': 'USDT',
|
'stake_currency': 'USDT',
|
||||||
'fiat_currency': 'USD',
|
'fiat_currency': 'USD',
|
||||||
'sell_reason': SellType.SELL_SIGNAL.value,
|
'sell_reason': SellType.SELL_SIGNAL.value,
|
||||||
|
Loading…
Reference in New Issue
Block a user