Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit 7b9738d

Browse files
committed
Added basic charset/set_charset test
1 parent 71656ec commit 7b9738d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_charset.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import GeoIP
4+
from nose.tools import assert_equal
5+
6+
7+
def test_charset():
8+
gi = GeoIP.open("tests/data/GeoIPOrg.dat", GeoIP.GEOIP_STANDARD)
9+
10+
gi.set_charset(GeoIP.GEOIP_CHARSET_UTF8)
11+
assert_equal(gi.charset(), GeoIP.GEOIP_CHARSET_UTF8)
12+
13+
assert_equal(gi.name_by_addr("142.217.214.0"),
14+
'LINO Solutions Internet de Télébec')

0 commit comments

Comments
 (0)