currency test don't pass when Currency Rates Source Not Ready (forex)
Yesterday, 22/sep night we detected that currency test don't pass:
Error:
File "/tryton/trytond/trytond/modules/currency/tests/scenario_currency_rate_update.rst", line 49, in scenario_currency_rate_update.rst
Failed example:
rate = [r for r in eur.rates if r.date < today][0]
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python3.9/doctest.py", line 1336, in __run
exec(compile(example.source, filename, "single",
File "<doctest scenario_currency_rate_update.rst[24]>", line 1, in <module>
rate = [r for r in eur.rates if r.date < today][0]
IndexError: list index out of range
Debug:
Traceback (most recent call last):
File "/home/raimon/projectes/nandev2/nancore/trytond/trytond/modules/currency/currency.py", line 443, in fetch_ecb
return get_rates(self.currency.code, date)
File "/home/raimon/.virtualenvs/nandev2/lib/python3.9/site-packages/forex_python/converter.py", line 62, in get_rates
raise RatesNotAvailableError("Currency Rates Source Not Ready")
forex_python.converter.RatesNotAvailableError: Currency Rates Source Not Ready