def check_dnsl(self, lst, ip): '''Check the IP address in a DNS list. @type ip: string @param ip: the IP to check @type lst: sting @param lst: the DNS list to check in @rtype: C{Deferred} @return: twisted.names.client resolver ''' rip = bleyhelpers.reverse_ip(ip) lookup = '%s.%s' % (rip, lst) d = client.lookupAddress(lookup) return d
def test_reverse_ip(self): for ip in self.ips: self.assertEquals(bleyhelpers.reverse_ip(ip[0]), ip[1])