def test_invalid_phash(self): with raises(Address.InvalidHashLength): Address('a')
def test_invalid_network(self): with raises(Address.UnknownNetwork): Address('a' * 20, -1)
def test_create(self): Address('a' * 20, networks.livenet, Address.Type.PublicKey) Address('a' * 20, networks.livenet, Address.Type.Script) Address('a' * 20, networks.testnet, Address.Type.PublicKey) Address('a' * 20, networks.testnet, Address.Type.Script)