Fix test failures due to additional field

This commit is contained in:
Matthias 2023-03-24 21:05:10 +01:00
parent 281dd7785e
commit cbdd86d777
2 changed files with 7 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class RPCSellCancelMsg(__RPCBuyMsgBase):
close_date: datetime close_date: datetime
class __AnalyzedDFData(TypedDict): class _AnalyzedDFData(TypedDict):
key: PairWithTimeframe key: PairWithTimeframe
df: Any df: Any
la: datetime la: datetime
@ -105,7 +105,7 @@ class __AnalyzedDFData(TypedDict):
class RPCAnalyzedDFMsg(RPCSendMsgBase): class RPCAnalyzedDFMsg(RPCSendMsgBase):
"""New Analyzed dataframe message""" """New Analyzed dataframe message"""
type: Literal[RPCMessageType.ANALYZED_DF] type: Literal[RPCMessageType.ANALYZED_DF]
data: __AnalyzedDFData data: _AnalyzedDFData
class RPCNewCandleMsg(RPCSendMsgBase): class RPCNewCandleMsg(RPCSendMsgBase):

View File

@ -3326,6 +3326,7 @@ def test_execute_trade_exit_up(default_conf_usdt, ticker_usdt, fee, ticker_usdt_
'profit_ratio': 0.00493809 if is_short else 0.09451372, 'profit_ratio': 0.00493809 if is_short else 0.09451372,
'stake_currency': 'USDT', 'stake_currency': 'USDT',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'base_currency': 'ETH',
'sell_reason': ExitType.ROI.value, 'sell_reason': ExitType.ROI.value,
'exit_reason': ExitType.ROI.value, 'exit_reason': ExitType.ROI.value,
'open_date': ANY, 'open_date': ANY,
@ -3389,6 +3390,7 @@ def test_execute_trade_exit_down(default_conf_usdt, ticker_usdt, fee, ticker_usd
'profit_amount': -5.65990099 if is_short else -0.00075, 'profit_amount': -5.65990099 if is_short else -0.00075,
'profit_ratio': -0.0945681 if is_short else -1.247e-05, 'profit_ratio': -0.0945681 if is_short else -1.247e-05,
'stake_currency': 'USDT', 'stake_currency': 'USDT',
'base_currency': 'ETH',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'sell_reason': ExitType.STOP_LOSS.value, 'sell_reason': ExitType.STOP_LOSS.value,
'exit_reason': ExitType.STOP_LOSS.value, 'exit_reason': ExitType.STOP_LOSS.value,
@ -3474,6 +3476,7 @@ def test_execute_trade_exit_custom_exit_price(
'profit_amount': pytest.approx(profit_amount), 'profit_amount': pytest.approx(profit_amount),
'profit_ratio': profit_ratio, 'profit_ratio': profit_ratio,
'stake_currency': 'USDT', 'stake_currency': 'USDT',
'base_currency': 'ETH',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'sell_reason': 'foo', 'sell_reason': 'foo',
'exit_reason': 'foo', 'exit_reason': 'foo',
@ -3547,6 +3550,7 @@ def test_execute_trade_exit_down_stoploss_on_exchange_dry_run(
'profit_ratio': -0.00501253 if is_short else -0.01493766, 'profit_ratio': -0.00501253 if is_short else -0.01493766,
'stake_currency': 'USDT', 'stake_currency': 'USDT',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'base_currency': 'ETH',
'sell_reason': ExitType.STOP_LOSS.value, 'sell_reason': ExitType.STOP_LOSS.value,
'exit_reason': ExitType.STOP_LOSS.value, 'exit_reason': ExitType.STOP_LOSS.value,
'open_date': ANY, 'open_date': ANY,
@ -3811,6 +3815,7 @@ def test_execute_trade_exit_market_order(
'profit_amount': pytest.approx(profit_amount), 'profit_amount': pytest.approx(profit_amount),
'profit_ratio': profit_ratio, 'profit_ratio': profit_ratio,
'stake_currency': 'USDT', 'stake_currency': 'USDT',
'base_currency': 'ETH',
'fiat_currency': 'USD', 'fiat_currency': 'USD',
'sell_reason': ExitType.ROI.value, 'sell_reason': ExitType.ROI.value,
'exit_reason': ExitType.ROI.value, 'exit_reason': ExitType.ROI.value,