Exemple #1
0
 def test_ipv6addr_uniqlocal(self):
     try:
         eval_ipaddr('fc00::215:5dff:fe5d:66e9',self.cursor)
     except Exception as e:
         self.assertEqual(str(e), 'Private IP address')
Exemple #2
0
 def test_ipv6addr_multicast(self):
     # class D
     try:
         eval_ipaddr('FF02::1',self.cursor)
     except Exception as e:
         self.assertEqual(str(e), 'Multicast IP address')
Exemple #3
0
 def test_ipv6addr(self):
     r = eval_ipaddr('2001:240:bb81::10:180',self.cursor)
     self.assertEqual(r, 'JP,2001:240::/32')
Exemple #4
0
 def test_ipaddr_alphabet(self):
     try:
         eval_ipaddr('aaa.bbb.ccc.ddd',self.cursor)
     except Exception as e:
         self.assertEqual(str(e), 'Not IP address')
Exemple #5
0
 def test_ipaddr_noip(self):
     try:
         eval_ipaddr('999.999.999.999',self.cursor)
     except Exception as e:
         self.assertEqual(str(e), 'Not IP address')
Exemple #6
0
 def test_ipaddr_private(self):
     try:
         eval_ipaddr('192.168.1.1',self.cursor)
     except Exception as e:
         self.assertEqual(str(e), 'Private IP address')
Exemple #7
0
 def test_ipaddr(self):
     r = eval_ipaddr('202.232.2.180',self.cursor)
     self.assertEqual(r, 'JP,202.224.0.0/11')