From e485aff597d68d9f649109976a8dd85517bf8235 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 17 Nov 2018 13:12:11 +0100 Subject: [PATCH] Test failed load on invalid ordertypes --- freqtrade/tests/strategy/test_strategy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/freqtrade/tests/strategy/test_strategy.py b/freqtrade/tests/strategy/test_strategy.py index e6204b5f5..d1a87ecfa 100644 --- a/freqtrade/tests/strategy/test_strategy.py +++ b/freqtrade/tests/strategy/test_strategy.py @@ -207,6 +207,16 @@ def test_strategy_override_order_types(caplog): " {'buy': 'market', 'sell': 'limit', 'stoploss': 'limit'}." ) in caplog.record_tuples + config = { + 'strategy': 'DefaultStrategy', + 'order_types': {'buy': 'market'} + } + # Raise error for invalid configuration + with pytest.raises(ImportError, + match=r"Impossible to load Strategy 'DefaultStrategy'. " + r"Order-types mapping is incomplete."): + StrategyResolver(config) + def test_deprecate_populate_indicators(result): default_location = path.join(path.dirname(path.realpath(__file__)))