Fix tests for additional info
This commit is contained in:
parent
0dc1a8e037
commit
6997524a04
@ -428,9 +428,17 @@ def test_api_profit(botclient, mocker, ticker, fee, markets, limit_buy_order, li
|
|||||||
'profit_all_coin': 6.217e-05,
|
'profit_all_coin': 6.217e-05,
|
||||||
'profit_all_fiat': 0,
|
'profit_all_fiat': 0,
|
||||||
'profit_all_percent': 6.2,
|
'profit_all_percent': 6.2,
|
||||||
|
'profit_all_percent_mean': 6.2,
|
||||||
|
'profit_all_ratio_mean': 0.06201058,
|
||||||
|
'profit_all_percent_sum': 6.2,
|
||||||
|
'profit_all_ratio_sum': 0.06201058,
|
||||||
'profit_closed_coin': 6.217e-05,
|
'profit_closed_coin': 6.217e-05,
|
||||||
'profit_closed_fiat': 0,
|
'profit_closed_fiat': 0,
|
||||||
'profit_closed_percent': 6.2,
|
'profit_closed_percent': 6.2,
|
||||||
|
'profit_closed_ratio_mean': 0.06201058,
|
||||||
|
'profit_closed_percent_mean': 6.2,
|
||||||
|
'profit_closed_ratio_sum': 0.06201058,
|
||||||
|
'profit_closed_percent_sum': 6.2,
|
||||||
'trade_count': 1,
|
'trade_count': 1,
|
||||||
'closed_trade_count': 1,
|
'closed_trade_count': 1,
|
||||||
}
|
}
|
||||||
|
@ -434,7 +434,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%)`' in msg_mock.call_args_list[-1][0][0]
|
assert ('∙ `-0.00000500 BTC (-0.50%) (-0.5 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
||||||
|
in msg_mock.call_args_list[-1][0][0])
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
|
|
||||||
# Update the ticker with a market going up
|
# Update the ticker with a market going up
|
||||||
@ -447,10 +448,12 @@ 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%)`' in msg_mock.call_args_list[-1][0][0]
|
assert ('∙ `0.00006217 BTC (6.20%) (6.2 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
||||||
|
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%)`' in msg_mock.call_args_list[-1][0][0]
|
assert ('∙ `0.00006217 BTC (6.20%) (6.2 \N{GREEK CAPITAL LETTER SIGMA}%)`'
|
||||||
|
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 '*Best Performing:* `ETH/BTC: 6.20%`' in msg_mock.call_args_list[-1][0][0]
|
assert '*Best Performing:* `ETH/BTC: 6.20%`' in msg_mock.call_args_list[-1][0][0]
|
||||||
|
Loading…
Reference in New Issue
Block a user