示例#1
0
 def test_format_ip_with_mask(self):
     self.assertEqual(utils.format_ip_with_mask('192.168.0.1', 0),
                      '0.0.0.0/0')
     self.assertEqual(utils.format_ip_with_mask('192.168.0.1', 32),
                      '192.168.0.1/32')
     self.assertEqual(utils.format_ip_with_mask('192.168.0.1', 26),
                      '192.168.0.0/26')
     self.assertEqual(utils.format_ip_with_mask('192.168.0.255', 26),
                      '192.168.0.192/26')
示例#2
0
 def test_format_ip_with_mask(self):
     self.assertEqual(utils.format_ip_with_mask('192.168.0.1', 0),
                      '0.0.0.0/0')
     self.assertEqual(utils.format_ip_with_mask('192.168.0.1', 32),
                      '192.168.0.1/32')
     self.assertEqual(utils.format_ip_with_mask('192.168.0.1', 26),
                      '192.168.0.0/26')
     self.assertEqual(utils.format_ip_with_mask('192.168.0.255', 26),
                      '192.168.0.192/26')