def setUp(self):
     self._data = data
     self._metadata_block = metadata_block
     self.decoder_instance = BlockDecoder.decode(self._data)
     self._tx_data = tx_data
     self.decode_transaction = \
         BlockDecoder.decode_transaction(self._tx_data)
     self.decoded_metadata = BlockDecoder.decode(self._metadata_block)
Esempio n. 2
0
 def test_decode_failure(self):
     """
     Checks failure cases for decode of block.
     """
     self.assertRaises(TypeError, lambda: BlockDecoder.decode())
     self.assertRaises(ValueError, lambda: BlockDecoder.decode('test'))
Esempio n. 3
0
 def setUp(self):
     self._data = data
     self.decoder_instance = BlockDecoder.decode(self._data)