Fix set_test_proxy usage

This commit is contained in:
Matthias 2023-01-16 22:09:53 +01:00
parent b193d8418d
commit 92a5efad0e

View File

@ -127,7 +127,8 @@ def set_test_proxy(config: Config, use_proxy: bool) -> Config:
@pytest.fixture(params=EXCHANGES, scope="class") @pytest.fixture(params=EXCHANGES, scope="class")
def exchange(request, exchange_conf): def exchange(request, exchange_conf):
set_test_proxy(exchange_conf, EXCHANGES[request.param].get('use_ci_proxy', False)) exchange_conf = set_test_proxy(
exchange_conf, EXCHANGES[request.param].get('use_ci_proxy', False))
exchange_conf['exchange']['name'] = request.param exchange_conf['exchange']['name'] = request.param
exchange_conf['stake_currency'] = EXCHANGES[request.param]['stake_currency'] exchange_conf['stake_currency'] = EXCHANGES[request.param]['stake_currency']
exchange = ExchangeResolver.load_exchange(request.param, exchange_conf, validate=True) exchange = ExchangeResolver.load_exchange(request.param, exchange_conf, validate=True)
@ -140,7 +141,8 @@ def exchange_futures(request, exchange_conf, class_mocker):
if not EXCHANGES[request.param].get('futures') is True: if not EXCHANGES[request.param].get('futures') is True:
yield None, request.param yield None, request.param
else: else:
set_test_proxy(exchange_conf, EXCHANGES[request.param].get('use_ci_proxy', False)) exchange_conf = set_test_proxy(
exchange_conf, EXCHANGES[request.param].get('use_ci_proxy', False))
exchange_conf = deepcopy(exchange_conf) exchange_conf = deepcopy(exchange_conf)
exchange_conf['exchange']['name'] = request.param exchange_conf['exchange']['name'] = request.param
exchange_conf['trading_mode'] = 'futures' exchange_conf['trading_mode'] = 'futures'