Check if exchang provides bid/ask via fetch_tickers - and fail with spread filter if it doesn't.

closes #8286
This commit is contained in:
Matthias
2023-03-09 19:42:43 +01:00
parent 29dfb5c169
commit d3a3ddbc61
4 changed files with 15 additions and 0 deletions

View File

@@ -828,6 +828,12 @@ def test_pair_whitelist_not_supported_Spread(mocker, default_conf, tickers) -> N
match=r'Exchange does not support fetchTickers, .*'):
get_patched_freqtradebot(mocker, default_conf)
mocker.patch(f'{EXMS}.exchange_has', MagicMock(return_value=True))
mocker.patch(f'{EXMS}.get_option', MagicMock(return_value=False))
with pytest.raises(OperationalException,
match=r'.*requires exchange to have bid/ask data'):
get_patched_freqtradebot(mocker, default_conf)
@pytest.mark.parametrize("pairlist", TESTABLE_PAIRLISTS)
def test_pairlist_class(mocker, whitelist_conf, markets, pairlist):