mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve test stability by making keys optional in the ccxt test-matrix
This commit is contained in:
parent
2b1a8f2fbb
commit
7a545f49af
|
@ -87,6 +87,7 @@ EXCHANGES = {
|
|||
'stake_currency': 'USDT',
|
||||
'hasQuoteVolume': True,
|
||||
'timeframe': '5m',
|
||||
'futures': False,
|
||||
},
|
||||
'bitvavo': {
|
||||
'pair': 'BTC/EUR',
|
||||
|
@ -322,7 +323,7 @@ class TestCCXTExchange():
|
|||
def test_ccxt_get_max_leverage_spot(self, exchange):
|
||||
spot, spot_name = exchange
|
||||
if spot:
|
||||
leverage_in_market_spot = EXCHANGES[spot_name]['leverage_in_spot_market']
|
||||
leverage_in_market_spot = EXCHANGES[spot_name].get('leverage_in_spot_market')
|
||||
if leverage_in_market_spot:
|
||||
spot_pair = EXCHANGES[spot_name].get('pair', EXCHANGES[spot_name]['pair'])
|
||||
spot_leverage = spot.get_max_leverage(spot_pair, 20)
|
||||
|
@ -332,7 +333,7 @@ class TestCCXTExchange():
|
|||
def test_ccxt_get_max_leverage_futures(self, exchange_futures):
|
||||
futures, futures_name = exchange_futures
|
||||
if futures:
|
||||
leverage_tiers_public = EXCHANGES[futures_name]['leverage_tiers_public']
|
||||
leverage_tiers_public = EXCHANGES[futures_name].get('leverage_tiers_public')
|
||||
if leverage_tiers_public:
|
||||
futures_pair = EXCHANGES[futures_name].get(
|
||||
'futures_pair',
|
||||
|
@ -355,7 +356,7 @@ class TestCCXTExchange():
|
|||
|
||||
def test_ccxt_load_leverage_tiers(self, exchange_futures):
|
||||
futures, futures_name = exchange_futures
|
||||
if futures and EXCHANGES[futures_name]['leverage_tiers_public']:
|
||||
if futures and EXCHANGES[futures_name].get('leverage_tiers_public'):
|
||||
leverage_tiers = futures.load_leverage_tiers()
|
||||
futures_pair = EXCHANGES[futures_name].get(
|
||||
'futures_pair',
|
||||
|
@ -388,7 +389,7 @@ class TestCCXTExchange():
|
|||
|
||||
def test_ccxt_dry_run_liquidation_price(self, exchange_futures):
|
||||
futures, futures_name = exchange_futures
|
||||
if futures and EXCHANGES[futures_name]['leverage_tiers_public']:
|
||||
if futures and EXCHANGES[futures_name].get('leverage_tiers_public'):
|
||||
|
||||
futures_pair = EXCHANGES[futures_name].get(
|
||||
'futures_pair',
|
||||
|
|
Loading…
Reference in New Issue
Block a user