From e46dac3fbd2846d7a22d1c54ca9ff1a64368d2e8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 31 Mar 2019 15:45:22 +0200 Subject: [PATCH] Test stoploss does not raise dependencyexception --- freqtrade/tests/test_freqtradebot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/freqtrade/tests/test_freqtradebot.py b/freqtrade/tests/test_freqtradebot.py index 5bf0bfcbb..e53d26793 100644 --- a/freqtrade/tests/test_freqtradebot.py +++ b/freqtrade/tests/test_freqtradebot.py @@ -1031,6 +1031,13 @@ def test_handle_stoploss_on_exchange(mocker, default_conf, fee, caplog, assert trade.stoploss_order_id is None assert trade.is_open is False + mocker.patch( + 'freqtrade.exchange.Exchange.stoploss_limit', + side_effect=DependencyException() + ) + freqtrade.handle_stoploss_on_exchange(trade) + assert log_has('Unable to create stoploss order: ', caplog.record_tuples) + def test_handle_stoploss_on_exchange_trailing(mocker, default_conf, fee, caplog, markets, limit_buy_order, limit_sell_order) -> None: