Beispiel #1
0
    def test_encoding_of_complete_tx(self):
        self.tx.sign(self.source_identity)
        self.assertFalse(self.tx.is_incomplete)

        encoded = self.tx.encode()
        recovered_tx = Transaction.decode(encoded)
        self.assertIsNotNone(recovered_tx)
        self.assertEqual(self.tx, recovered_tx)
Beispiel #2
0
    def test_failure_to_decode_partial(self):
        encoded_partial = self.tx.encode_partial()

        self.assertIsNone(Transaction.decode(encoded_partial))