def test_block_header(self): bts = self.bts test_block_id = self.test_block_id block = BlockHeader(test_block_id, steem_instance=bts) self.assertEqual(block.identifier, test_block_id) self.assertTrue(isinstance(block.time(), datetime)) self.assertTrue(isinstance(block, dict)) block2 = BlockHeader(test_block_id + 1, steem_instance=bts) self.assertTrue(block2.time() > block.time()) with self.assertRaises(exceptions.BlockDoesNotExistsException): BlockHeader(0, steem_instance=bts)
def test_block_header(self, node_param): if node_param == "non_appbase": bts = self.bts else: bts = self.appbase block = BlockHeader(self.test_block_id, steem_instance=bts) self.assertEqual(block.identifier, self.test_block_id) self.assertTrue(isinstance(block.time(), datetime)) self.assertTrue(isinstance(block, dict)) block2 = BlockHeader(self.test_block_id + 1, steem_instance=bts) self.assertTrue(block2.time() > block.time()) with self.assertRaises(exceptions.BlockDoesNotExistsException): BlockHeader(0, steem_instance=bts)