Пример #1
0
 def test_parse_brackets(self):
     expected = IPRange('1.2.3.118', '1.2.3.121')
     _input = '1.2.3.1[18-21]'
     self.assertEqual(expected, cidrize.parse_brackets(_input))
Пример #2
0
 def test_parse_brackets_fail(self):
     expected = None
     _input = '10.10.1[67].0/24'
     self.assertEqual(expected, cidrize.parse_brackets(_input))