Fix flake8 error in test_fiat_convert

This commit is contained in:
A. Schueler 2021-05-22 13:43:48 +02:00
parent f8cdd6475c
commit be13856171
1 changed files with 6 additions and 1 deletions

View File

@ -138,7 +138,11 @@ def test_fiat_too_many_requests_response(mocker, caplog):
length_cryptomap = len(fiat_convert._cryptomap)
assert length_cryptomap == 0
assert fiat_convert._backoff > datetime.datetime.now().timestamp()
assert log_has('Too many requests for Coingecko API, backing off and trying again later.', caplog)
assert log_has(
'Too many requests for Coingecko API, backing off and trying again later.',
caplog
)
def test_fiat_invalid_response(mocker, caplog):
# Because CryptoToFiatConverter is a Singleton we reset the listings
@ -157,6 +161,7 @@ def test_fiat_invalid_response(mocker, caplog):
assert log_has_re('Could not load FIAT Cryptocurrency map for the following problem: .*',
caplog)
def test_convert_amount(mocker):
mocker.patch('freqtrade.rpc.fiat_convert.CryptoToFiatConverter.get_price', return_value=12345.0)