def test_ipv6(self): self.assertEqual(addr_family("1:2::3:4"), socket.AF_INET6)
def test_ipv4(self): self.assertEqual(addr_family("1.2.3.4"), socket.AF_INET)