tests: add missing assert
This commit is contained in:
parent
29d13f7130
commit
557d41a3a6
@ -5,13 +5,6 @@ from freqtrade.main import refresh_whitelist
|
||||
# perhaps try to anticipate that by using some python package
|
||||
|
||||
|
||||
def assert_list_equal(l1, l2):
|
||||
for pair in l1:
|
||||
assert pair in l2
|
||||
for pair in l2:
|
||||
assert pair in l1
|
||||
|
||||
|
||||
def whitelist_conf():
|
||||
return {
|
||||
"stake_currency": "BTC",
|
||||
@ -53,7 +46,7 @@ def test_refresh_whitelist(mocker):
|
||||
whitelist = ['BTC_ETH', 'BTC_TKN']
|
||||
pairslist = conf['exchange']['pair_whitelist']
|
||||
# Ensure all except those in whitelist are removed
|
||||
set(whitelist) == set(pairslist)
|
||||
assert set(whitelist) == set(pairslist)
|
||||
|
||||
|
||||
def test_refresh_whitelist_dynamic(mocker):
|
||||
@ -65,7 +58,7 @@ def test_refresh_whitelist_dynamic(mocker):
|
||||
whitelist = ['BTC_ETH', 'BTC_TKN']
|
||||
refresh_whitelist(whitelist)
|
||||
pairslist = conf['exchange']['pair_whitelist']
|
||||
set(whitelist) == set(pairslist)
|
||||
assert set(whitelist) == set(pairslist)
|
||||
|
||||
|
||||
def test_refresh_whitelist_dynamic_empty(mocker):
|
||||
@ -78,4 +71,4 @@ def test_refresh_whitelist_dynamic_empty(mocker):
|
||||
conf['exchange']['pair_whitelist'] = []
|
||||
refresh_whitelist(whitelist)
|
||||
pairslist = conf['exchange']['pair_whitelist']
|
||||
set(whitelist) == set(pairslist)
|
||||
assert set(whitelist) == set(pairslist)
|
||||
|
Loading…
Reference in New Issue
Block a user