Add test for precision_remove ...
BTT should not be in the list when that is enabled.
This commit is contained in:
parent
e2cbb7e7da
commit
3c5deb9aaf
@ -667,6 +667,7 @@ def tickers():
|
|||||||
'vwap': 0.01869197,
|
'vwap': 0.01869197,
|
||||||
'open': 0.018585,
|
'open': 0.018585,
|
||||||
'close': 0.018573,
|
'close': 0.018573,
|
||||||
|
'last': 0.018799,
|
||||||
'baseVolume': 81058.66,
|
'baseVolume': 81058.66,
|
||||||
'quoteVolume': 2247.48374509,
|
'quoteVolume': 2247.48374509,
|
||||||
},
|
},
|
||||||
|
@ -113,6 +113,7 @@ def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, markets, tickers)
|
|||||||
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
||||||
mocker.patch('freqtrade.exchange.Exchange.get_markets', markets)
|
mocker.patch('freqtrade.exchange.Exchange.get_markets', markets)
|
||||||
mocker.patch('freqtrade.exchange.Exchange.get_tickers', tickers)
|
mocker.patch('freqtrade.exchange.Exchange.get_tickers', tickers)
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange.symbol_price_prec', lambda s, p, r: round(r, 8))
|
||||||
|
|
||||||
# Test to retrieved BTC sorted on quoteVolume (default)
|
# Test to retrieved BTC sorted on quoteVolume (default)
|
||||||
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='BTC', key='quoteVolume')
|
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='BTC', key='quoteVolume')
|
||||||
@ -132,6 +133,15 @@ def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, markets, tickers)
|
|||||||
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='ETH', key='quoteVolume')
|
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='ETH', key='quoteVolume')
|
||||||
assert whitelist == []
|
assert whitelist == []
|
||||||
|
|
||||||
|
freqtrade.pairlists._precision_filter = True
|
||||||
|
freqtrade.config['stake_currency'] = 'BTC'
|
||||||
|
# Retest First 2 test-cases to make sure BTT is not in it (too low priced)
|
||||||
|
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='BTC', key='quoteVolume')
|
||||||
|
assert whitelist == ['ETH/BTC', 'TKN/BTC']
|
||||||
|
|
||||||
|
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='BTC', key='bidVolume')
|
||||||
|
assert whitelist == ['TKN/BTC', 'ETH/BTC']
|
||||||
|
|
||||||
|
|
||||||
def test_gen_pair_whitelist_not_supported(mocker, default_conf, tickers) -> None:
|
def test_gen_pair_whitelist_not_supported(mocker, default_conf, tickers) -> None:
|
||||||
default_conf['pairlist'] = {'method': 'VolumePairList',
|
default_conf['pairlist'] = {'method': 'VolumePairList',
|
||||||
|
Loading…
Reference in New Issue
Block a user