[FIX] base: run defined modifiers tests

This commit is contained in:
Christophe Simonis 2017-04-26 19:36:10 +02:00
parent 863f46ec71
commit 2a65b8156d
2 changed files with 9 additions and 4 deletions

View File

@ -9,6 +9,7 @@ from lxml.builder import E
from psycopg2 import IntegrityError
from openerp.osv.orm import modifiers_tests
from openerp.exceptions import ValidationError
from openerp.tests import common
import openerp.tools
@ -854,6 +855,10 @@ class test_views(ViewCase):
string="Replacement title", version="7.0"
))
def test_modifiers(self):
# implemeted elsewhere...
modifiers_tests()
class ViewModeField(ViewCase):
"""
This should probably, eventually, be folded back into other test case

View File

@ -118,13 +118,13 @@ def test_modifiers(what, expected):
node = etree.fromstring(what)
transfer_node_to_modifiers(node, modifiers)
simplify_modifiers(modifiers)
json = simplejson.dumps(modifiers)
assert json == expected, "%s != %s" % (json, expected)
dumped = simplejson.dumps(modifiers)
assert dumped == expected, "%s != %s" % (dumped, expected)
elif isinstance(what, dict):
transfer_field_to_modifiers(what, modifiers)
simplify_modifiers(modifiers)
json = simplejson.dumps(modifiers)
assert json == expected, "%s != %s" % (json, expected)
dumped = simplejson.dumps(modifiers)
assert dumped == expected, "%s != %s" % (dumped, expected)
# To use this test: