Example #1
0
    def test_from_hex(self):
        address = Address.from_hex(data['hex'])

        assert address.network is data['network']
        assert address.phash == decode_hex(data['phash'])
        assert address.type == data['type']
        assert address.to_string() == data['base58h']
Example #2
0
    def test_from_hex(self):
        address = Address.from_hex(data['hex'])

        assert address.network is data['network']
        assert address.phash == decode_hex(data['phash'])
        assert address.type == data['type']
        assert address.to_string() == data['base58h']
Example #3
0
 def test_from_invalid_hex(self):
     with raises(Address.InvalidHex): Address.from_hex('a')
     with raises(Address.InvalidHex): Address.from_hex('a@')
Example #4
0
 def test_from_invalid_hex(self):
     with raises(Address.InvalidHex): Address.from_hex('a')
     with raises(Address.InvalidHex): Address.from_hex('a@')