fix typos in workflow constraint error messages stable
authorDavid Douard <david.douard@logilab.fr>
Thu, 26 Sep 2013 15:18:59 +0200
branchstable
changeset 9242 564bdd4dbf8f
parent 9241 cbee712dd310
child 9243 c44ff833748f
fix typos in workflow constraint error messages
entities/test/unittest_wfobjs.py
schemas/workflow.py
--- a/entities/test/unittest_wfobjs.py	Tue Sep 17 17:44:15 2013 +0200
+++ b/entities/test/unittest_wfobjs.py	Thu Sep 26 15:18:59 2013 +0200
@@ -75,7 +75,7 @@
         wf.add_transition(u'baz', (bar,), foo)
         with self.assertRaises(ValidationError) as cm:
             self.commit()
-        self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already have a transition of that name'})
+        self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already has a transition of that name'})
         # no pb if not in the same workflow
         wf2 = add_wf(self, 'Company')
         foo = wf.add_state(u'foo', initial=True)
@@ -88,7 +88,7 @@
         biz.cw_set(name=u'baz')
         with self.assertRaises(ValidationError) as cm:
             self.commit()
-        self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already have a transition of that name'})
+        self.assertEqual(cm.exception.errors, {'name-subject': 'workflow already has a transition of that name'})
 
 
 class WorkflowTC(CubicWebTC):
--- a/schemas/workflow.py	Tue Sep 17 17:44:15 2013 +0200
+++ b/schemas/workflow.py	Thu Sep 26 15:18:59 2013 +0200
@@ -89,14 +89,14 @@
     name = String(required=True, indexed=True, internationalizable=True,
                   maxsize=256,
                   constraints=[RQLUniqueConstraint('S name N, S transition_of WF, Y transition_of WF, Y name N', 'Y',
-                                                   _('workflow already have a transition of that name'))])
+                                                   _('workflow already has a transition of that name'))])
     type = String(vocabulary=(_('normal'), _('auto')), default='normal')
     description = RichString(description=_('semantic description of this transition'))
 
     transition_of = SubjectRelation('Workflow', cardinality='1*', composite='object',
                                     description=_('workflow to which this transition belongs'),
                                     constraints=[RQLUniqueConstraint('S name N, Y transition_of O, Y name N', 'Y',
-                                                                     _('workflow already have a transition of that name'))])
+                                                                     _('workflow already has a transition of that name'))])
 
 
 class require_group(RelationDefinition):