def test_account(tmp_path): test_configuration = prepare_conf(tmp_path) WalletAPI.new_wallet(test_configuration, 'my-password') assert len(list( tmp_path.iterdir())) == 2 # one config.yaml and one keystore address, pub_key = WalletAPI.get_wallet(test_configuration) public_key_bytes = decode_hex(pub_key) assert len(public_key_bytes) == 64 assert Web3.isAddress(address) assert Web3.isChecksumAddress(address)
def test_account(tmp_path): test_configuration = prepare_conf(tmp_path) # mocker.patch('eth_wallet.configuration.Configuration.__init__', # return_value=test_config) WalletAPI.new_wallet(test_configuration, 'my-password') assert len(list( tmp_path.iterdir())) == 2 # one config.yaml and one keystore address, pub_key = WalletAPI.get_wallet(test_configuration) public_key_bytes = decode_hex(pub_key) assert len(public_key_bytes) == 64 assert Web3.isAddress(address) assert Web3.isChecksumAddress(address)