def test_commit(self): "Test msg_commit" t1 = DummyTransaction( amount=0, hash="hash", meetingPoint="meetingpoint", isPayerSide=True) t1.token = "token" t2 = DummyTransaction( amount=0, hash="hash", meetingPoint="meetingpoint", isPayerSide=False) self.mp.transactionPairs = {"hash": [t1, t2]} self.mp.msg_commit(t1) self.assertEqual(self.mp.transactionPairs, {}) self.assertEqual(t1.trace, []) self.assertEqual(t2.trace, [ ('msg_commit', ("token",), {}) ])