diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-07-31 20:31:46 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-07-31 20:31:46 +0200 |
| commit | cc0baa086afc35cc2ef9eca72c3d7abba43550da (patch) | |
| tree | d31754cfd69a4f96f1810c4681d7fccc5079ae05 /odoo | |
| parent | 8c81eaabe6b451b112f6af5b2bb06afe9ed91839 (diff) | |
[FIX] base: adapt test expectation to python 3.7
Compare exception message to the exact one raised in all versions.
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/addons/base/tests/test_qweb.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/odoo/addons/base/tests/test_qweb.py b/odoo/addons/base/tests/test_qweb.py index 136ad02e250..ab2d0fa4dd0 100644 --- a/odoo/addons/base/tests/test_qweb.py +++ b/odoo/addons/base/tests/test_qweb.py @@ -5,7 +5,6 @@ import collections import json import os.path import re -import sys from lxml import etree @@ -481,12 +480,16 @@ class TestQWebNS(TransactionCase): </t> """ }) - error_msg = "Can't convert 'int' object to str implicitly" - if sys.version_info >= (3, 6): - error_msg = "must be str, not int" - with self.assertRaisesRegexp(QWebException, error_msg): + + try: + "" + 0 + except TypeError as e: + error_msg = e.args[0] + + with self.assertRaises(QWebException, msg=error_msg): view1.render() + from copy import deepcopy class FileSystemLoader(object): def __init__(self, path): |
