Fix api test
This commit is contained in:
parent
c9c7f84e8c
commit
02d716a8be
@ -677,12 +677,16 @@ def test_api_profit(botclient, mocker, ticker, fee, markets):
|
|||||||
'profit_all_ratio_mean': -0.6641100666666667,
|
'profit_all_ratio_mean': -0.6641100666666667,
|
||||||
'profit_all_percent_sum': -398.47,
|
'profit_all_percent_sum': -398.47,
|
||||||
'profit_all_ratio_sum': -3.9846604,
|
'profit_all_ratio_sum': -3.9846604,
|
||||||
|
'profit_all_percent': -4.41,
|
||||||
|
'profit_all_ratio': -0.044063014216106644,
|
||||||
'profit_closed_coin': 0.00073913,
|
'profit_closed_coin': 0.00073913,
|
||||||
'profit_closed_fiat': 9.124559849999999,
|
'profit_closed_fiat': 9.124559849999999,
|
||||||
'profit_closed_ratio_mean': 0.0075,
|
'profit_closed_ratio_mean': 0.0075,
|
||||||
'profit_closed_percent_mean': 0.75,
|
'profit_closed_percent_mean': 0.75,
|
||||||
'profit_closed_ratio_sum': 0.015,
|
'profit_closed_ratio_sum': 0.015,
|
||||||
'profit_closed_percent_sum': 1.5,
|
'profit_closed_percent_sum': 1.5,
|
||||||
|
'profit_closed_ratio': 7.391275897987988e-07,
|
||||||
|
'profit_closed_percent': 0.0,
|
||||||
'trade_count': 6,
|
'trade_count': 6,
|
||||||
'closed_trade_count': 2,
|
'closed_trade_count': 2,
|
||||||
'winning_trades': 2,
|
'winning_trades': 2,
|
||||||
|
@ -452,7 +452,8 @@ def test_profit_handle(default_conf, update, ticker, ticker_sell_up, fee,
|
|||||||
assert msg_mock.call_count == 1
|
assert msg_mock.call_count == 1
|
||||||
assert 'No closed trade' in msg_mock.call_args_list[-1][0][0]
|
assert 'No closed trade' in msg_mock.call_args_list[-1][0][0]
|
||||||
assert '*ROI:* All trades' in msg_mock.call_args_list[-1][0][0]
|
assert '*ROI:* All trades' in msg_mock.call_args_list[-1][0][0]
|
||||||
assert ('∙ `-0.00000500 BTC (-0.50%) (-0.5 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
mocker.patch('freqtrade.wallets.Wallets.get_starting_balance', return_value=0.01)
|
||||||
|
assert ('∙ `-0.00000500 BTC (-0.50%) (-0.0 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
||||||
in msg_mock.call_args_list[-1][0][0])
|
in msg_mock.call_args_list[-1][0][0])
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
|
|
||||||
@ -466,11 +467,11 @@ def test_profit_handle(default_conf, update, ticker, ticker_sell_up, fee,
|
|||||||
telegram._profit(update=update, context=MagicMock())
|
telegram._profit(update=update, context=MagicMock())
|
||||||
assert msg_mock.call_count == 1
|
assert msg_mock.call_count == 1
|
||||||
assert '*ROI:* Closed trades' in msg_mock.call_args_list[-1][0][0]
|
assert '*ROI:* Closed trades' in msg_mock.call_args_list[-1][0][0]
|
||||||
assert ('∙ `0.00006217 BTC (6.20%) (6.2 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
assert ('∙ `0.00006217 BTC (6.20%) (0.62 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
||||||
in msg_mock.call_args_list[-1][0][0])
|
in msg_mock.call_args_list[-1][0][0])
|
||||||
assert '∙ `0.933 USD`' in msg_mock.call_args_list[-1][0][0]
|
assert '∙ `0.933 USD`' in msg_mock.call_args_list[-1][0][0]
|
||||||
assert '*ROI:* All trades' in msg_mock.call_args_list[-1][0][0]
|
assert '*ROI:* All trades' in msg_mock.call_args_list[-1][0][0]
|
||||||
assert ('∙ `0.00006217 BTC (6.20%) (6.2 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
assert ('∙ `0.00006217 BTC (6.20%) (0.62 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
||||||
in msg_mock.call_args_list[-1][0][0])
|
in msg_mock.call_args_list[-1][0][0])
|
||||||
assert '∙ `0.933 USD`' in msg_mock.call_args_list[-1][0][0]
|
assert '∙ `0.933 USD`' in msg_mock.call_args_list[-1][0][0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user