def test_many_callback(self):
    transition = Transition('test', sources=[], target='success', side_effects=[fail_invoice], failure_callbacks=[disable_invoice, receive_invoice], failed_state='failed')
    self.assertTrue(self.invoice.is_available)
    self.assertFalse(self.invoice.customer_received)
    state = State(self.invoice, 'status')
    transition.change_state(state)
    self.assertEqual(self.invoice.status, 'failed')
    self.assertFalse(self.invoice.is_available)
    self.assertTrue(self.invoice.customer_received)
    self.assertFalse(state.is_locked())
def test_many_callback(self):
    transition = Transition('test', sources=[], target='success', side_effects=[fail_invoice], failure_callbacks=[disable_invoice, receive_invoice], failed_state='failed')
    self.assertTrue(self.invoice.is_available)
    self.assertFalse(self.invoice.customer_received)
    state = State(self.invoice, 'status')
    transition.change_state(state)
    self.assertEqual(self.invoice.status, 'failed')
    self.assertFalse(self.invoice.is_available)
    self.assertTrue(self.invoice.customer_received)
    self.assertFalse(state.is_locked())