def test_get_asn_dns(self): result = Net('74.125.225.229') try: self.assertIsInstance(result.get_asn_dns(), str) except ASNLookupError: pass except AssertionError as e: raise e except Exception as e: self.fail('Unexpected exception raised: {0}'.format(e)) result.dns_zone = 'a' self.assertRaises(ASNLookupError, result.get_asn_dns)
def test_get_asn_dns(self): result = Net('74.125.225.229') try: self.assertIsInstance(result.get_asn_dns(), list) except ASNLookupError: pass except AssertionError as e: raise e except Exception as e: self.fail('Unexpected exception raised: {0}'.format(e)) result.dns_zone = 'a' self.assertRaises(ASNLookupError, result.get_asn_dns)