entities/test/unittest_wfobjs.py
branchstable
changeset 3617 9036a8fbbd57
parent 3616 600ee58a1375
child 3628 440931181322
--- a/entities/test/unittest_wfobjs.py	Thu Oct 08 11:44:06 2009 +0200
+++ b/entities/test/unittest_wfobjs.py	Thu Oct 08 11:58:19 2009 +0200
@@ -173,15 +173,19 @@
         created    = twf.add_state(_('created'), initial=True)
         identified = twf.add_state(_('identified'))
         released   = twf.add_state(_('released'))
+        closed   = twf.add_state(_('closed'))
         twf.add_wftransition(_('identify'), subwf, (created,),
                              [(xsigned, identified), (xaborted, created)])
         twf.add_wftransition(_('release'), subwf, (identified,),
                              [(xsigned, released), (xaborted, identified)])
+        twf.add_wftransition(_('close'), subwf, (released,),
+                             [(xsigned, closed), (xaborted, released)])
         self.commit()
         group = self.add_entity('CWGroup', name=u'grp1')
         self.commit()
-        for trans in ('identify', 'release'):
+        for trans in ('identify', 'release', 'close'):
             group.fire_transition(trans)
+            self.commit()
 
     def test_subworkflow_base(self):
         """subworkflow