equal
deleted
inserted
replaced
54 wf = add_wf(self, 'Company') |
54 wf = add_wf(self, 'Company') |
55 wf.add_state(u'foo', initial=True) |
55 wf.add_state(u'foo', initial=True) |
56 self.commit() |
56 self.commit() |
57 wf.add_state(u'foo') |
57 wf.add_state(u'foo') |
58 ex = self.assertRaises(ValidationError, self.commit) |
58 ex = self.assertRaises(ValidationError, self.commit) |
59 self.assertEquals(ex.errors, {'name-subject': 'workflow already have a state of that name'}) |
59 self.assertEquals(ex.errors, {'state_of-subject': 'workflow already have a state of that name'}) |
60 # no pb if not in the same workflow |
60 # no pb if not in the same workflow |
61 wf2 = add_wf(self, 'Company') |
61 wf2 = add_wf(self, 'Company') |
62 foo = wf2.add_state(u'foo', initial=True) |
62 foo = wf2.add_state(u'foo', initial=True) |
63 self.commit() |
63 self.commit() |
64 # gnark gnark |
64 # gnark gnark |
430 wf = add_wf(self, 'Company') |
430 wf = add_wf(self, 'Company') |
431 wf.add_state('asleep', initial=True) |
431 wf.add_state('asleep', initial=True) |
432 self.execute('SET X custom_workflow WF WHERE X eid %(x)s, WF eid %(wf)s', |
432 self.execute('SET X custom_workflow WF WHERE X eid %(x)s, WF eid %(wf)s', |
433 {'wf': wf.eid, 'x': self.member.eid}) |
433 {'wf': wf.eid, 'x': self.member.eid}) |
434 ex = self.assertRaises(ValidationError, self.commit) |
434 ex = self.assertRaises(ValidationError, self.commit) |
435 self.assertEquals(ex.errors, {'custom_workflow-subject': 'workflow isn\'t a workflow for this type'}) |
435 self.assertEquals(ex.errors, {'custom_workflow-subject': u"workflow isn't a workflow for this type"}) |
436 |
436 |
437 def test_del_custom_wf(self): |
437 def test_del_custom_wf(self): |
438 """member in some state shared by the new workflow, nothing has to be |
438 """member in some state shared by the new workflow, nothing has to be |
439 done |
439 done |
440 """ |
440 """ |