summaryrefslogtreecommitdiff
path: root/openerp/addons/base/tests/test_func.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2016-05-04 14:18:34 +0200
committerRaphael Collet <rco@openerp.com>2016-05-11 11:40:25 +0200
commit214a59845f253e1f6604c4fd737fd3e18a50d8a9 (patch)
tree90c64e84c00b0eda6407c3355bbf3be6aff87234 /openerp/addons/base/tests/test_func.py
parent47c44578baea30c75dcfe520bcea858287b2bb7b (diff)
[MIG] base/tests
Convert YAML tests into Python tests: - translation tests moved to test_translate.py - test phases tests moved to test_phase.py - safe_eval tests moved to test_base.py - parent_store tests moved to test_base.py - float rounding tests moved to test_float.py - `ir.rule` tests moved to test_acl.py - search tests moved to test_expression.py
Diffstat (limited to 'openerp/addons/base/tests/test_func.py')
-rw-r--r--openerp/addons/base/tests/test_func.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/openerp/addons/base/tests/test_func.py b/openerp/addons/base/tests/test_func.py
index 1be2469666a..ac394cb9b79 100644
--- a/openerp/addons/base/tests/test_func.py
+++ b/openerp/addons/base/tests/test_func.py
@@ -1,16 +1,17 @@
# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
import functools
import unittest
-from openerp.tools.func import compose
-from openerp.tools import frozendict
+from odoo.tools import frozendict
+from odoo.tools.func import compose
+
class TestCompose(unittest.TestCase):
def test_basic(self):
str_add = compose(str, lambda a, b: a + b)
- self.assertEqual(
- str_add(1, 2),
- "3")
+ self.assertEqual(str_add(1, 2), "3")
def test_decorator(self):
""" ensure compose() can be partially applied as a decorator
@@ -21,6 +22,7 @@ class TestCompose(unittest.TestCase):
self.assertEqual(mul(5, 42), u"210")
+
class TestFrozendict(unittest.TestCase):
def test_frozendict_immutable(self):
""" Ensure that a frozendict is immutable. """