use pytest

This commit is contained in:
gcarq
2017-09-30 15:58:31 +02:00
parent df4da75535
commit 8d3a6279b2
2 changed files with 4 additions and 3 deletions

View File

@@ -91,7 +91,8 @@ def execute_sell(trade: Trade, current_rate: float) -> None:
whitelist = _CONF[trade.exchange.name.lower()]['pair_whitelist']
profit = trade.exec_sell_order(current_rate, balance)
whitelist.append(trade.pair)
if trade.pair not in whitelist:
whitelist.append(trade.pair)
message = '*{}:* Selling [{}]({}) at rate `{:f} (profit: {}%)`'.format(
trade.exchange.name,
trade.pair.replace('_', '/'),