class States: new = State(_(u"New"), True, delete=False) open = State(_(u"Open"), delete=False) hold = State(_(u"Hold"), delete=False) todo = State(_(u"Todo"), delete=False) started = State(_(u"Started"), delete=False) review = State(_(u"Review"), delete=False, update=False) finished = State(_(u"Finished"), update=False, delete=True) cancelled = State(_(u"Cancelled"), update=False, delete=True)
class States: start = State("start", default=True, delete=False) end = State("end", update=False, delete=True)
class States: draft = State(_(u"Draft"), True, delete=False) open = State(_(u"Open"), update=False, delete=False) payed = State(_(u"Payed"), update=False, delete=False) cancelled = State(_(u"Cancelled"), update=False, delete=True)
class States: open = State(_(u"Open"), default=True, delete=False) completed = State(_(u"Completed"), update=False, delete=True) cancelled = State(_(u"Cancelled"), update=False, delete=True)
class States: active = State(_(u"Active"), True, update=False, delete=False) finished = State(_(u"Finished"), delete=True) validated = State(_(u"Validated"), update=False, delete=True)
class States: draft = State(_(u"Draft"), True, delete=False) send = State(_(u"Send"), update=False, delete=False) accepted = State(_(u"Accepted"), update=False, delete=False) invoiced = State(_(u"Done"), update=False, delete=False) cancelled = State(_(u"Cancelled"), update=False, delete=True)
class States: open = State(_(u"Open"), True, delete=False) balanced = State(_(u"Balanced"), update=False, delete=False) cancelled = State(_(u"Cancelled"), update=False, delete=False)
class States: test1 = State('Test 1', default=True) test2 = State('Test 2', default=True)
class States: test = State('Test', default=False)
def test_state(self): obj = State(b'name') self.assertEqual(obj.name, b"name") self.assertEqual(str(obj), "name") self.assertEqual(repr(obj), "<State: 'name'>")
class States: test1 = State('Test 1', default=True) test2 = State('Test 2') test3 = State('Test 3') test4 = State('Test 4') test5 = State('Test 5')