コード例 #1
0
def test_is_valid_chain_bad_genesis_block(blockchain_three_blocks):
    blockchain_three_blocks.chain[0].hash = 'evil-hash'
    with pytest.raises(Exception, match='the genesis block must be invalid'
                       ):  #mismo error que se pone en raise Exception
        Blockchain.is_valid_chain(blockchain_three_blocks.chain)
コード例 #2
0
def test_is_valid_chain(blockchain_three_blocks):

    Blockchain.is_valid_chain(blockchain_three_blocks.chain)