Beispiel #1
0
    def test_wallet_is_wallet_file_valid(self, encrypt_wallet, wallet_factory,
                                         wallet_path):
        wallet = wallet_factory()
        wallet.change_passphrase(passphrase="password",
                                 encrypt_wallet=encrypt_wallet,
                                 encrypt_secrets=False)
        wallet.save(wallet_path)

        assert Wallet.is_wallet_file_valid(wallet_path)
Beispiel #2
0
    def test_wallet_is_wallet_file_valid_invalid_content(
            self, wallet_path, content):
        with open(wallet_path, "w+") as f:
            f.write(content)

        assert not Wallet.is_wallet_file_valid(wallet_path)