Add test for show_trades

This commit is contained in:
Matthias
2020-05-02 11:44:18 +02:00
parent 56bb5f7a11
commit 1066a4504b
2 changed files with 41 additions and 4 deletions

View File

@@ -212,8 +212,8 @@ def start_show_trades(args: Dict[str, Any]) -> None:
if config.get('trade_ids'):
tfilter.append(Trade.id.in_(config['trade_ids']))
trades = Trade.get_trades(tfilter)
logger.info("Printing Trades: ")
trades = Trade.get_trades(tfilter).all()
logger.info(f"Printing {len(trades)} Trades: ")
if config.get('print_json', False):
print(json.dumps([trade.to_json() for trade in trades], indent=4))
else: