mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Fix some more tests
This commit is contained in:
parent
af3eea3805
commit
8d002a8f28
|
@ -285,12 +285,7 @@ def test_volumepairlist_caching(mocker, markets, whitelist_conf, tickers):
|
||||||
|
|
||||||
|
|
||||||
def test_pairlistmanager_no_pairlist(mocker, markets, whitelist_conf, caplog):
|
def test_pairlistmanager_no_pairlist(mocker, markets, whitelist_conf, caplog):
|
||||||
del whitelist_conf['pairlists'][0]['method']
|
|
||||||
mocker.patch('freqtrade.exchange.Exchange.exchange_has', MagicMock(return_value=True))
|
mocker.patch('freqtrade.exchange.Exchange.exchange_has', MagicMock(return_value=True))
|
||||||
with pytest.raises(OperationalException,
|
|
||||||
match=r"No Pairlist defined!"):
|
|
||||||
get_patched_freqtradebot(mocker, whitelist_conf)
|
|
||||||
assert log_has_re("No method in .*", caplog)
|
|
||||||
|
|
||||||
whitelist_conf['pairlists'] = []
|
whitelist_conf['pairlists'] = []
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ def test_load_config_max_open_trades_zero(default_conf, mocker, caplog) -> None:
|
||||||
|
|
||||||
assert validated_conf['max_open_trades'] == 0
|
assert validated_conf['max_open_trades'] == 0
|
||||||
assert 'internals' in validated_conf
|
assert 'internals' in validated_conf
|
||||||
assert log_has('Validating configuration ...', caplog)
|
|
||||||
|
|
||||||
|
|
||||||
def test_load_config_combine_dicts(default_conf, mocker, caplog) -> None:
|
def test_load_config_combine_dicts(default_conf, mocker, caplog) -> None:
|
||||||
|
@ -132,7 +131,6 @@ def test_load_config_combine_dicts(default_conf, mocker, caplog) -> None:
|
||||||
assert validated_conf['exchange']['pair_whitelist'] == conf2['exchange']['pair_whitelist']
|
assert validated_conf['exchange']['pair_whitelist'] == conf2['exchange']['pair_whitelist']
|
||||||
|
|
||||||
assert 'internals' in validated_conf
|
assert 'internals' in validated_conf
|
||||||
assert log_has('Validating configuration ...', caplog)
|
|
||||||
|
|
||||||
|
|
||||||
def test_from_config(default_conf, mocker, caplog) -> None:
|
def test_from_config(default_conf, mocker, caplog) -> None:
|
||||||
|
@ -159,7 +157,6 @@ def test_from_config(default_conf, mocker, caplog) -> None:
|
||||||
assert validated_conf['exchange']['pair_whitelist'] == conf2['exchange']['pair_whitelist']
|
assert validated_conf['exchange']['pair_whitelist'] == conf2['exchange']['pair_whitelist']
|
||||||
assert validated_conf['fiat_display_currency'] == "EUR"
|
assert validated_conf['fiat_display_currency'] == "EUR"
|
||||||
assert 'internals' in validated_conf
|
assert 'internals' in validated_conf
|
||||||
assert log_has('Validating configuration ...', caplog)
|
|
||||||
assert isinstance(validated_conf['user_data_dir'], Path)
|
assert isinstance(validated_conf['user_data_dir'], Path)
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,7 +188,6 @@ def test_load_config_max_open_trades_minus_one(default_conf, mocker, caplog) ->
|
||||||
|
|
||||||
assert validated_conf['max_open_trades'] > 999999999
|
assert validated_conf['max_open_trades'] > 999999999
|
||||||
assert validated_conf['max_open_trades'] == float('inf')
|
assert validated_conf['max_open_trades'] == float('inf')
|
||||||
assert log_has('Validating configuration ...', caplog)
|
|
||||||
assert "runmode" in validated_conf
|
assert "runmode" in validated_conf
|
||||||
assert validated_conf['runmode'] == RunMode.DRY_RUN
|
assert validated_conf['runmode'] == RunMode.DRY_RUN
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user