def test_hex_format(self):
        blockchain_ref = make_blockchain()
        outfile = BytesIO()
        blockchain_ref.save_to_file(outfile)
        outfile.seek(0)

        blockchain = Blockchain(NEW_USER_PUB_KEY)
        blockchain.from_file(outfile)

        assert blockchain == blockchain_ref
    def test_transactions_are_the_same(self):
        blockchain_ref = make_blockchain()
        ref_transactions = blockchain_ref[0].transactions
        outfile = BytesIO()
        blockchain_ref.save_to_file(outfile)
        outfile.seek(0)

        blockchain = Blockchain(NEW_USER_PUB_KEY)
        blockchain.from_file(outfile)
        transactions = blockchain[0].transactions

        assert len(transactions) == 3
        assert transactions[0] == ref_transactions[0]
        assert transactions[1] == ref_transactions[1]
        assert transactions[2] == ref_transactions[2]