Beispiel #1
0
 def test_backandforth(self):
     for s in ['0.0.0.0', '255.255.255.255', '128.30.92.92']:
         self.assertEqual(s, ipv4.int_to_dotquad(ipv4.dotquad_to_int(s)))
Beispiel #2
0
 def test_backandforth(self):
     for i in [0, 0xFFFFFFFF, 2149473372]:
         self.assertEqual(i, ipv4.dotquad_to_int(ipv4.int_to_dotquad(i)))
Beispiel #3
0
 def test_valid_strings(self):
     self.assertEqual(0, ipv4.dotquad_to_int('0.0.0.0'))
     self.assertEqual(0xFFFFFFFF, ipv4.dotquad_to_int('255.255.255.255'))
     self.assertEqual(2149473372, ipv4.dotquad_to_int('128.30.92.92'))