| @@ -686,10 +686,16 @@ class Telegram(RPCHandler): | |||||||
|                 count['losses'] |                 count['losses'] | ||||||
|             ] for reason, count in stats['sell_reasons'].items() |             ] for reason, count in stats['sell_reasons'].items() | ||||||
|         ] |         ] | ||||||
|  |         sell_reasons_msg = 'No trades yet.' | ||||||
|  |         for reason in chunks(sell_reasons_tabulate, 25): | ||||||
|             sell_reasons_msg = tabulate( |             sell_reasons_msg = tabulate( | ||||||
|             sell_reasons_tabulate, |                 reason, | ||||||
|                 headers=['Sell Reason', 'Sells', 'Wins', 'Losses'] |                 headers=['Sell Reason', 'Sells', 'Wins', 'Losses'] | ||||||
|             ) |             ) | ||||||
|  |             if len(sell_reasons_tabulate) > 25: | ||||||
|  |                 self._send_msg(sell_reasons_msg, ParseMode.MARKDOWN) | ||||||
|  |                 sell_reasons_msg = '' | ||||||
|  |  | ||||||
|         durations = stats['durations'] |         durations = stats['durations'] | ||||||
|         duration_msg = tabulate( |         duration_msg = tabulate( | ||||||
|             [ |             [ | ||||||
|   | |||||||
| @@ -731,7 +731,7 @@ def test_telegram_stats(default_conf, update, ticker, ticker_sell_up, fee, | |||||||
|  |  | ||||||
|     telegram._stats(update=update, context=MagicMock()) |     telegram._stats(update=update, context=MagicMock()) | ||||||
|     assert msg_mock.call_count == 1 |     assert msg_mock.call_count == 1 | ||||||
|     # assert 'No trades yet.' in msg_mock.call_args_list[0][0][0] |     assert 'No trades yet.' in msg_mock.call_args_list[0][0][0] | ||||||
|     msg_mock.reset_mock() |     msg_mock.reset_mock() | ||||||
|  |  | ||||||
|     # Create some test data |     # Create some test data | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user