1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-03-17 08:42:01 +01:00

[Tests EmComponent] Added the support of MlString in check_equals

This commit is contained in:
Roland Haroutiounian 2015-07-31 17:15:07 +02:00
commit 1b3565d890

View file

@ -159,7 +159,10 @@ class ComponentTestCase(TestCase):
for vname in val:
if vname in ['string', 'help']: # Special test for mlstrings
# MlString comparison
vml = json.loads(val[vname])
if isinstance(val[vname], MlString):
vml = val[vname].translations
else:
vml = json.loads(val[vname])
for vn in vml:
self.assertEqual(vml[vn], getattr(test_comp, vname).get(vn), msg)
elif vname in ['date_create', 'date_update']:
@ -408,7 +411,6 @@ class TestCreate(ComponentTestCase):
tc = EM_TEST_OBJECT.create_component(EmClass.__name__, vals)
self.check_equals(EmClass, vals, tc, "The created EmTestComp hasn't the good property values")
pass
'''
#====================#
# EmComponent.create #