def test02_bad_query(self):
        "Testing GeoIP query parameter checking."
        cntry_g = GeoIP(city='<foo>')
        # No city database available, these calls should fail.
        with self.assertRaises(GeoIPException):
            cntry_g.city('google.com')
        with self.assertRaises(GeoIPException):
            cntry_g.coords('yahoo.com')

        # Non-string query should raise TypeError
        with self.assertRaises(TypeError):
            cntry_g.country_code(17)
        with self.assertRaises(TypeError):
            cntry_g.country_name(GeoIP)