[FIX] base: run defined modifiers tests
This commit is contained in:
parent
863f46ec71
commit
2a65b8156d
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue