Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/p/y/pygeoip-0.3.1/tests/test.py   pygeoip(Download)
import pygeoip
from pygeoip import const
from tests.config import COUNTRY_DB_PATH, CORRUPT_DB_PATH
 
class TestGenerals(unittest.TestCase):
    def testCorruptDatabase(self):
        gi = pygeoip.GeoIP(filename=CORRUPT_DB_PATH)
        gi.country_code_by_name('google.com')
 
    @raises(socket.error)