Adding the number of trades for each traded pair in the performance command

This commit is contained in:
Jean-Baptiste LE STANG 2018-01-03 00:06:50 +01:00
parent 55d0d27756
commit fbb19e451d
2 changed files with 1 additions and 3 deletions

View File

@ -479,7 +479,6 @@ def _performance(bot: Bot, update: Update) -> None:
stats = '\n'.join('{index}.\t<code>{pair}\t{profit:.2f}% ({count})</code>'.format(
index=i + 1,
pair=pair,
#url=exchange.get_pair_detail_url(pair),
profit=round(rate * 100, 2),
count=count
) for i, (pair, rate, count) in enumerate(pair_rates))

View File

@ -400,11 +400,10 @@ def test_performance_handle(
trade.close_date = datetime.utcnow()
trade.is_open = False
_performance(bot=MagicMock(), update=update)
assert msg_mock.call_count == 1
assert 'Performance' in msg_mock.call_args_list[0][0][0]
assert '<code>[BTC_ETH](https://www.bittrex.com/Market/Index?MarketName=BTC-ETH)\t6.20% (1)</code>' in msg_mock.call_args_list[0][0][0]
assert '<code>BTC_ETH\t6.20% (1)</code>' in msg_mock.call_args_list[0][0][0]
def test_daily_handle(