Small style fixes and adjusted tests
This commit is contained in:
@@ -535,7 +535,6 @@ def test_validate_order_types_not_in_config(default_conf, mocker):
|
||||
|
||||
def test_validate_required_startup_candles(default_conf, mocker, caplog):
|
||||
api_mock = MagicMock()
|
||||
default_conf['startup_candle_count'] = 2000
|
||||
mocker.patch('freqtrade.exchange.Exchange.name', PropertyMock(return_value='Binance'))
|
||||
|
||||
mocker.patch('freqtrade.exchange.Exchange._init_ccxt', api_mock)
|
||||
@@ -543,7 +542,12 @@ def test_validate_required_startup_candles(default_conf, mocker, caplog):
|
||||
mocker.patch('freqtrade.exchange.Exchange._load_async_markets', MagicMock())
|
||||
mocker.patch('freqtrade.exchange.Exchange.validate_pairs', MagicMock())
|
||||
|
||||
with pytest.raises(OperationalException, match=r'This strategy requires 2000.*'):
|
||||
default_conf['startup_candle_count'] = 20
|
||||
ex = Exchange(default_conf)
|
||||
assert ex
|
||||
default_conf['startup_candle_count'] = 600
|
||||
|
||||
with pytest.raises(OperationalException, match=r'This strategy requires 600.*'):
|
||||
Exchange(default_conf)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user