Fix test failures

This commit is contained in:
Matthias 2020-12-13 10:31:24 +01:00
parent b7d4ff9c21
commit a6e6ce16b1
2 changed files with 5 additions and 4 deletions

View File

@ -223,8 +223,8 @@ def init_persistence(default_conf):
@pytest.fixture(scope="function")
def default_conf():
return get_default_conf()
def default_conf(testdatadir):
return get_default_conf(testdatadir)
def get_default_conf(testdatadir):

View File

@ -88,12 +88,13 @@ class TestCCXTExchange():
def test_ccxt_fetch_l2_orderbook(self, exchange):
exchange, exchangename = exchange
l2 = exchange.fetch_l2_order_book('BTC/USDT')
pair = EXCHANGES[exchangename]['pair']
l2 = exchange.fetch_l2_order_book(pair)
assert 'asks' in l2
assert 'bids' in l2
for val in [1, 2, 5, 25, 100]:
l2 = exchange.fetch_l2_order_book('BTC/USDT', val)
l2 = exchange.fetch_l2_order_book(pair, val)
if not exchange._ft_has['l2_limit_range'] or val in exchange._ft_has['l2_limit_range']:
assert len(l2['asks']) == val
assert len(l2['bids']) == val