def test(self):
   self.assertEqual(impexpd._VerifyListening(socket.AF_INET,
                                             "192.0.2.7", 1234),
                    ("192.0.2.7", 1234))
   self.assertEqual(impexpd._VerifyListening(socket.AF_INET6, "::1", 9876),
                    ("::1", 9876))
   self.assertEqual(impexpd._VerifyListening(socket.AF_INET6, "[::1]", 4563),
                    ("::1", 4563))
   self.assertEqual(impexpd._VerifyListening(socket.AF_INET6,
                                             "[2001:db8::1:4563]", 4563),
                    ("2001:db8::1:4563", 4563))
Exemple #2
0
 def test(self):
     self.assertEqual(
         impexpd._VerifyListening(socket.AF_INET, "192.0.2.7", 1234),
         ("192.0.2.7", 1234))
     self.assertEqual(
         impexpd._VerifyListening(socket.AF_INET6, "::1", 9876),
         ("::1", 9876))
     self.assertEqual(
         impexpd._VerifyListening(socket.AF_INET6, "[::1]", 4563),
         ("::1", 4563))
     self.assertEqual(
         impexpd._VerifyListening(socket.AF_INET6, "[2001:db8::1:4563]",
                                  4563), ("2001:db8::1:4563", 4563))