diff options
| author | xmo-odoo <xmo@odoo.com> | 2017-04-27 13:59:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-27 13:59:33 +0200 |
| commit | 2e6a589f417af48e3322955ffff6e94b6d8a24e3 (patch) | |
| tree | aa613ecc1f74a9531a03de89aa2bdc7bb32eed3b /addons/website/tests | |
| parent | de4a2216b953abb86094c9bfa5f45b1eaaa79d3d (diff) | |
[FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch
* thin compat module stripped down from werkzeug (to augment as needed)
issue 8530
Diffstat (limited to 'addons/website/tests')
| -rw-r--r-- | addons/website/tests/test_crawl.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/website/tests/test_crawl.py b/addons/website/tests/test_crawl.py index 5ef5c551163..704cd62a41b 100644 --- a/addons/website/tests/test_crawl.py +++ b/addons/website/tests/test_crawl.py @@ -10,6 +10,8 @@ import lxml.html import odoo import re +from odoo.tools import pycompat + _logger = logging.getLogger(__name__) @@ -38,7 +40,7 @@ class Crawler(odoo.tests.HttpCase): _logger.info("%s %s", msg, url) r = self.url_open(url) code = r.getcode() - self.assertIn(code, xrange(200, 300), "%s Fetching %s returned error response (%d)" % (msg, url, code)) + self.assertIn(code, pycompat.range(200, 300), "%s Fetching %s returned error response (%d)" % (msg, url, code)) if r.info().gettype() == 'text/html': doc = lxml.html.fromstring(r.read()) |
