mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 20:23:57 +00:00
tests: test invalid category in list
This commit is contained in:
parent
8c097a81ea
commit
255ad7cac5
|
@ -2438,6 +2438,27 @@ def test_MarketCapPairList_exceptions(mocker, default_conf_usdt):
|
||||||
):
|
):
|
||||||
PairListManager(exchange, default_conf_usdt)
|
PairListManager(exchange, default_conf_usdt)
|
||||||
|
|
||||||
|
# Test invalid coinmarkets list
|
||||||
|
mocker.patch(
|
||||||
|
"freqtrade.plugins.pairlist.MarketCapPairList.FtCoinGeckoApi.get_coins_categories_list",
|
||||||
|
return_value=[
|
||||||
|
{"category_id": "layer-1"},
|
||||||
|
{"category_id": "protocol"},
|
||||||
|
{"category_id": "defi"},
|
||||||
|
],
|
||||||
|
)
|
||||||
|
default_conf_usdt["pairlists"] = [
|
||||||
|
{
|
||||||
|
"method": "MarketCapPairList",
|
||||||
|
"number_assets": 20,
|
||||||
|
"categories": ["layer-1", "defi", "layer250"],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
with pytest.raises(
|
||||||
|
OperationalException, match="category layer250 not in coingecko category list."
|
||||||
|
):
|
||||||
|
PairListManager(exchange, default_conf_usdt)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"pairlists,expected_error,expected_warning",
|
"pairlists,expected_error,expected_warning",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user