def test_state(self): o1 = Order() for state in Order.StateList: o1.state = state self.aEq(o1.state, state) with self.aRaise(InvalidStateException): o1.state = -1