diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-22 16:40:31 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2017-06-26 16:45:03 +0200 |
| commit | aaf8f3e37fa3c84c3b0cd0df1b7cb4f56c2ff95c (patch) | |
| tree | ea49d9262c02d037556724804cbfd94bccc855cd /odoo/addons/base | |
| parent | 5810ea2a97d63b7302f335cc64a2101d53995297 (diff) | |
[IMP] reorganise opcodes in categories
Diffstat (limited to 'odoo/addons/base')
| -rw-r--r-- | odoo/addons/base/tests/test_base.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/odoo/addons/base/tests/test_base.py b/odoo/addons/base/tests/test_base.py index 5a45f00e95c..6d6d209d352 100644 --- a/odoo/addons/base/tests/test_base.py +++ b/odoo/addons/base/tests/test_base.py @@ -7,10 +7,15 @@ import unittest from odoo.exceptions import ValidationError from odoo.tests.common import TransactionCase from odoo.tools import mute_logger -from odoo.tools.safe_eval import safe_eval +from odoo.tools.safe_eval import safe_eval, const_eval class TestSafeEval(unittest.TestCase): + def test_const(self): + # NB: True and False are names in Python 2 not consts + expected = (1, {"a": {2.5}}, [None, u"foo"]) + actual = const_eval('(1, {"a": {2.5}}, [None, u"foo"])') + self.assertEqual(actual, expected) def test_01_safe_eval(self): """ Try a few common expressions to verify they work with safe_eval """ |
