entities/test/unittest_wfobjs.py
changeset 10280 2cdab5e33542
parent 10092 f0363da0b5a0
child 10353 d9a1e7939ee6
--- a/entities/test/unittest_wfobjs.py	Wed Feb 04 15:13:36 2015 +0100
+++ b/entities/test/unittest_wfobjs.py	Wed Mar 18 22:43:51 2015 +0100
@@ -52,9 +52,9 @@
             shell.commit()
             with self.assertRaises(ValidationError) as cm:
                 wf.add_state(u'foo')
-            self.assertEqual({'name': u'name is part of violated unicity constraint',
-                              'state_of': u'state_of is part of violated unicity constraint',
-                              'unicity constraint': u'some relations violate a unicity constraint'},
+            self.assertEqual({'name': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              'state_of': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              '': u'some relations violate a unicity constraint'},
                              cm.exception.errors)
             shell.rollback()
             # no pb if not in the same workflow
@@ -67,9 +67,9 @@
             with self.assertRaises(ValidationError) as cm:
                 bar.cw_set(name=u'foo')
             shell.rollback()
-            self.assertEqual({'name': u'name is part of violated unicity constraint',
-                              'state_of': u'state_of is part of violated unicity constraint',
-                              'unicity constraint': u'some relations violate a unicity constraint'},
+            self.assertEqual({'name': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              'state_of': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              '': u'some relations violate a unicity constraint'},
                              cm.exception.errors)
 
     def test_duplicated_transition(self):
@@ -80,9 +80,9 @@
             wf.add_transition(u'baz', (foo,), bar, ('managers',))
             with self.assertRaises(ValidationError) as cm:
                 wf.add_transition(u'baz', (bar,), foo)
-            self.assertEqual({'name': u'name is part of violated unicity constraint',
-                              'transition_of': u'transition_of is part of violated unicity constraint',
-                              'unicity constraint': u'some relations violate a unicity constraint'},
+            self.assertEqual({'name': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              'transition_of': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              '': u'some relations violate a unicity constraint'},
                              cm.exception.errors)
             shell.rollback()
             # no pb if not in the same workflow
@@ -97,9 +97,9 @@
             with self.assertRaises(ValidationError) as cm:
                 biz.cw_set(name=u'baz')
             shell.rollback()
-            self.assertEqual({'name': u'name is part of violated unicity constraint',
-                              'transition_of': u'transition_of is part of violated unicity constraint',
-                              'unicity constraint': u'some relations violate a unicity constraint'},
+            self.assertEqual({'name': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              'transition_of': u'%(KEY-rtype)s is part of violated unicity constraint',
+                              '': u'some relations violate a unicity constraint'},
                              cm.exception.errors)