示例#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']
示例#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']
示例#3
0
 def test_from_invalid_hex(self):
     with raises(Address.InvalidHex): Address.from_hex('a')
     with raises(Address.InvalidHex): Address.from_hex('a@')
示例#4
0
 def test_from_invalid_hex(self):
     with raises(Address.InvalidHex): Address.from_hex('a')
     with raises(Address.InvalidHex): Address.from_hex('a@')