def test_acl_file(self): """测试acl_file调用""" acl_content = initconf.acl_file( dict(cnc=('192.168.1.1', '202.106.1.1'))) #log.debug("acl content is:" + acl_content) self.assertEqual(acl_content, 'acl "cnc" { 192.168.1.1; 202.106.1.1; };\n')
def test_muti_acl_file(self): """test muti record acl acl_file""" acl_content = initconf.acl_file( dict(cnc=('1.1.1.1', '2.2.2.2', '3.3.3.3'), telcom=('4.4.4.4', '5.5.5.5'))) self.assertEqual( acl_content, 'acl "telcom" { 4.4.4.4; 5.5.5.5; };\nacl "cnc" { 1.1.1.1; 2.2.2.2; 3.3.3.3; };\n' )
def test_muti_acl_file(self): """test muti record acl acl_file""" acl_content = initconf.acl_file( dict( cnc=('1.1.1.1','2.2.2.2','3.3.3.3'), telcom=('4.4.4.4','5.5.5.5') )) self.assertEqual(acl_content,'acl "telcom" { 4.4.4.4; 5.5.5.5; };\nacl "cnc" { 1.1.1.1; 2.2.2.2; 3.3.3.3; };\n')
def test_acl_file(self): """测试acl_file调用""" acl_content = initconf.acl_file( dict(cnc=('192.168.1.1', '202.106.1.1')) ) #log.debug("acl content is:" + acl_content) self.assertEqual(acl_content,'acl "cnc" { 192.168.1.1; 202.106.1.1; };\n')