コード例 #1
0
def test_isValidLedgerBadLedger(blockchain_three_blocks):
    blockchain_three_blocks.ledger[0].hash = 'bad_hash'

    with pytest.raises(Exception, match='genesis block must be valid'):
        Blockchain.isValidLedger(blockchain_three_blocks.ledger)
コード例 #2
0
def test_isValidLedger(blockchain_three_blocks):
    Blockchain.isValidLedger(blockchain_three_blocks.ledger)