Have sell_type stringify correctly
This commit is contained in:
parent
04eaf2c39c
commit
1339479882
@ -45,6 +45,10 @@ class SellType(Enum):
|
|||||||
EMERGENCY_SELL = "emergency_sell"
|
EMERGENCY_SELL = "emergency_sell"
|
||||||
NONE = ""
|
NONE = ""
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
# explicitly convert to String to help with exporting data.
|
||||||
|
return self.value
|
||||||
|
|
||||||
|
|
||||||
class SellCheckTuple(NamedTuple):
|
class SellCheckTuple(NamedTuple):
|
||||||
"""
|
"""
|
||||||
|
@ -320,7 +320,7 @@ def test_edge_overrides_stoploss(limit_buy_order, fee, caplog, mocker, edge_conf
|
|||||||
|
|
||||||
# stoploss shoud be hit
|
# stoploss shoud be hit
|
||||||
assert freqtrade.handle_trade(trade) is True
|
assert freqtrade.handle_trade(trade) is True
|
||||||
assert log_has('Executing Sell for NEO/BTC. Reason: SellType.STOP_LOSS', caplog)
|
assert log_has('Executing Sell for NEO/BTC. Reason: stop_loss', caplog)
|
||||||
assert trade.sell_reason == SellType.STOP_LOSS.value
|
assert trade.sell_reason == SellType.STOP_LOSS.value
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user