Use namedtuple for sell_return

This commit is contained in:
Matthias
2018-07-12 22:21:52 +02:00
parent ad98c62329
commit a452864b41
5 changed files with 29 additions and 19 deletions

View File

@@ -16,7 +16,7 @@ import requests
from freqtrade import (DependencyException, OperationalException,
TemporaryError, constants)
from freqtrade.analyze import SellType
from freqtrade.strategy.interface.IStrategy import SellType, SellCheckTuple
from freqtrade.freqtradebot import FreqtradeBot
from freqtrade.persistence import Trade
from freqtrade.rpc import RPCMessageType
@@ -1625,6 +1625,8 @@ def test_sell_profit_only_enable_loss(default_conf, limit_buy_order, fee, market
"""
patch_RPCManager(mocker)
patch_coinmarketcap(mocker)
mocker.patch('freqtrade.freqtradebot.strategy.interface.stop_loss_reached',
return_value=SellCheckTuple(sell_flag=False, sell_type=SellType.NONE))
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
validate_pairs=MagicMock(),