def testDestAddr2(self): self.assertTrue(to_ip('10.10.10.1')) self.assertTrue(to_ip('10.10.010.01')) self.assertTrue(to_ip('10.010.10.1'))
def testDestAddr1(self): self.assertTrue(is_valid_ip4_address(to_ip('www.wikipedia.org'))) self.assertRaises(socket.gaierror, to_ip, ('www.doesntexist.tld'))