def test_identical_networks_ipv6(self):
     networks = ['fd00:fd00:fd00:2000::/64', 'fd00:fd00:fd00:2000::/64']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 1)
     self.assertEqual('Networks fd00:fd00:fd00:2000::/64 and '
                      'fd00:fd00:fd00:2000::/64 overlap.',
                      errors[0])
 def test_second_cidr_is_subset_of_first_ipv6(self):
     networks = ['fd00:fd00:fd00:2000::/124', 'fd00:fd00:fd00:2000::/126']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 1)
     self.assertEqual('Networks fd00:fd00:fd00:2000::/124 and '
                      'fd00:fd00:fd00:2000::/126 overlap.',
                      errors[0])
 def test_multiple_overlapping_networks(self):
     networks = ['172.16.0.0/16', '172.16.10.0/24',
                 '172.16.11.0/23', '172.17.0.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 3)
     self.assertEqual('Networks 172.16.0.0/16 and 172.16.10.0/24 overlap.',
                      errors[0])
     self.assertEqual('Networks 172.16.0.0/16 and 172.16.11.0/23 overlap.',
                      errors[1])
     self.assertEqual('Networks 172.16.10.0/24 and 172.16.11.0/23 overlap.',
                      errors[2])
 def test_multiple_overlapping_networks(self):
     networks = [
         '172.16.0.0/16', '172.16.10.0/24', '172.16.11.0/23',
         '172.17.0.0/24'
     ]
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 3)
     self.assertEqual('Networks 172.16.0.0/16 and 172.16.10.0/24 overlap.',
                      errors[0])
     self.assertEqual('Networks 172.16.0.0/16 and 172.16.11.0/23 overlap.',
                      errors[1])
     self.assertEqual('Networks 172.16.10.0/24 and 172.16.11.0/23 overlap.',
                      errors[2])
 def test_second_cidr_is_subset_of_first(self):
     networks = ['172.16.0.0/16', '172.16.10.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 1)
     self.assertEqual('Networks 172.16.0.0/16 and 172.16.10.0/24 overlap.',
                      errors[0])
 def test_empty(self):
     errors = validation.check_cidr_overlap([])
     self.assertEqual([], errors)
 def test_non_overlapping_networks(self):
     networks = ['172.16.0.0/24', '172.17.0.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual([], errors)
 def test_identical_networks(self):
     networks = ['172.16.0.0/24', '172.16.0.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 1)
     self.assertEqual('Networks 172.16.0.0/24 and 172.16.0.0/24 overlap.',
                      errors[0])
 def test_network_none(self):
     errors = validation.check_cidr_overlap([None])
     self.assertEqual(len(errors), 1)
     self.assertEqual("Invalid network: None", errors[0])
 def test_single_network(self):
     errors = validation.check_cidr_overlap(['172.16.0.0/24'])
     self.assertEqual([], errors)
 def test_empty(self):
     errors = validation.check_cidr_overlap([])
     self.assertEqual([], errors)
 def test_none(self):
     errors = validation.check_cidr_overlap(None)
     self.assertEqual(len(errors), 1)
     self.assertEqual("The argument must be iterable.", errors[0])
 def test_none(self):
     errors = validation.check_cidr_overlap(None)
     self.assertEqual(len(errors), 1)
     self.assertEqual("The argument must be iterable.", errors[0])
 def test_network_none(self):
     errors = validation.check_cidr_overlap([None])
     self.assertEqual(len(errors), 1)
     self.assertEqual("Invalid network: None", errors[0])
 def test_second_cidr_is_subset_of_first(self):
     networks = ['172.16.0.0/16', '172.16.10.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 1)
     self.assertEqual('Networks 172.16.0.0/16 and 172.16.10.0/24 overlap.',
                      errors[0])
 def test_single_network(self):
     errors = validation.check_cidr_overlap(['172.16.0.0/24'])
     self.assertEqual([], errors)
 def test_identical_networks(self):
     networks = ['172.16.0.0/24', '172.16.0.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual(len(errors), 1)
     self.assertEqual('Networks 172.16.0.0/24 and 172.16.0.0/24 overlap.',
                      errors[0])
 def test_non_overlapping_networks(self):
     networks = ['172.16.0.0/24', '172.17.0.0/24']
     errors = validation.check_cidr_overlap(networks)
     self.assertEqual([], errors)
 def test_single_network_ipv6(self):
     errors = validation.check_cidr_overlap(['fd00:fd00:fd00:2000::/64'])
     self.assertEqual([], errors)