'GeoIP country querying methods.'

@mock.patch('socket.gethostbyname')
def test03_country(self, gethostbyname):

    gethostbyname.return_value = '128.249.1.1'
    g = GeoIP2(city='<foo>')
    for query in (self.fqdn, self.addr):
        self.assertEqual('US', g.country_code(query), ('Failed    for    func    country_code    and    query    %s' % query))
        self.assertEqual('United    States', g.country_name(query), ('Failed    for    func    country_name    and    query    %s' % query))
        self.assertEqual({'country_code': 'US', 'country_name': 'United    States'}, g.country(query))
