country test fails with urllib.error.HTTPError: HTTP Error 404: Not Found
https://download.geonames.org/export/zip/us.zip which is used in the country test case does no longer exist. Maybe we should not rely on external URLs in unit/scenario tests. Otherwise we can use https://download.geonames.org/export/zip/allCountries.zip
Doctest: scenario_country_import.rst
----------------------------------------------------------------------
Traceback (most recent call last):
File ".pyenv/versions/3.6.9/lib/python3.6/doctest.py", line 2199, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scenario_country_import.rst
File "trytond/trytond/modules/country/tests/scenario_country_import.rst", line 0
----------------------------------------------------------------------
File "trytond/trytond/modules/country/tests/scenario_country_import.rst", line 25, in scenario_country_import.rst
Failed example:
import_zip.do_import(['us'])
Exception raised:
Traceback (most recent call last):
File ".pyenv/versions/3.6.9/lib/python3.6/doctest.py", line 1330, in __run
compileflags, 1), test.globs)
File "<doctest scenario_country_import.rst[8]>", line 1, in <module>
import_zip.do_import(['us'])
File "trytond/trytond/modules/country/scripts/import_zip.py", line 107, in do_import
import_(fetch(code))
File "trytond/trytond/modules/country/scripts/import_zip.py", line 40, in fetch
responce = urlopen(url)
File ".pyenv/versions/3.6.9/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File ".pyenv/versions/3.6.9/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File ".pyenv/versions/3.6.9/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File ".pyenv/versions/3.6.9/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File ".pyenv/versions/3.6.9/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File ".pyenv/versions/3.6.9/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found