Test exchange initialization without stake currency
This commit is contained in:
parent
fff8ced3b0
commit
86ee545a5b
@ -284,7 +284,8 @@ class Exchange:
|
||||
:raise: OperationalException if stake-currency is not available.
|
||||
"""
|
||||
quote_currencies = self.get_quote_currencies()
|
||||
if stake_currency not in quote_currencies:
|
||||
# stake_currency can be empty for certain util commands.
|
||||
if stake_currency and stake_currency not in quote_currencies:
|
||||
raise OperationalException(
|
||||
f"{stake_currency} is not available as stake on {self.name}. "
|
||||
f"Available currencies are: {', '.join(quote_currencies)}")
|
||||
|
@ -365,7 +365,7 @@ def test__reload_markets_exception(default_conf, mocker, caplog):
|
||||
assert log_has_re(r"Could not reload markets.*", caplog)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("stake_currency", ['ETH', 'BTC', 'USDT'])
|
||||
@pytest.mark.parametrize("stake_currency", ['ETH', 'BTC', 'USDT', ''])
|
||||
def test_validate_stake_currency(default_conf, stake_currency, mocker, caplog):
|
||||
default_conf['stake_currency'] = stake_currency
|
||||
api_mock = MagicMock()
|
||||
|
Loading…
Reference in New Issue
Block a user