Small style fixes and adjusted tests

This commit is contained in:
Matthias
2019-10-27 10:56:38 +01:00
parent 73f5bff9c5
commit 132a4da7cf
7 changed files with 27 additions and 15 deletions

View File

@@ -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)