Exemple #1
0
 def test_exact_ip(self):
     ipr1 = IPRange(ip_from='127.0.0.1')
     self.assertTrue(ipr1.in_range('127.0.0.1'))
     self.assertFalse(ipr1.in_range('127.0.0.0'))
     self.assertFalse(ipr1.in_range('127.0.0.2'))
     self.assertFalse(ipr1.in_range('255.255.255.255'))
Exemple #2
0
 def test_100_to_end(self):
     ipr1 = IPRange(ip_from='100.1.1.1', ip_to='255.255.255.255')
     self.assertTrue(ipr1.in_range('127.0.0.1'))
Exemple #3
0
 def test_all_the_range(self):
     ipr1 = IPRange(ip_from='0.0.0.0', ip_to='255.255.255.255')
     self.assertTrue(ipr1.in_range('127.0.0.1'))
Exemple #4
0
 def test_exact_ip(self):
     ipr1 = IPRange(ip_from='127.0.0.1')
     self.assertTrue(ipr1.in_range('127.0.0.1'))
     self.assertFalse(ipr1.in_range('127.0.0.0'))
     self.assertFalse(ipr1.in_range('127.0.0.2'))
     self.assertFalse(ipr1.in_range('255.255.255.255'))
Exemple #5
0
 def test_100_to_end(self):
     ipr1 = IPRange(ip_from='100.1.1.1', ip_to='255.255.255.255')
     self.assertTrue(ipr1.in_range('127.0.0.1'))
Exemple #6
0
 def test_all_the_range(self):
     ipr1 = IPRange(ip_from='0.0.0.0', ip_to='255.255.255.255')
     self.assertTrue(ipr1.in_range('127.0.0.1'))