예제 #1
0
 def test_interface_switchport_port_security(self):
     with fake_filesystem_unittest.Patcher() as patcher:
         patcher.fs.create_file(
             '/mock',
             contents=test_interface_switchport_port_security["input"])
         self.assertEqual(convert_to_yaml(CiscoConfParse('/mock')),
                          test_interface_switchport_port_security["output"])
예제 #2
0
파일: tests.py 프로젝트: cwerner1/conf2yaml
 def test_firwall_1(self):
     lines = test_firewall_1["input"].split("\n")
     self.assertEqual(test_firewall_1["output"],
                      convert_to_yaml(uci.UciFile.from_lines(lines)))
예제 #3
0
파일: tests.py 프로젝트: cwerner1/conf2yaml
 def test_beardropper(self):
     lines = test_beardropper["input"].split("\n")
     self.assertEqual(test_beardropper["output"],
                      convert_to_yaml(uci.UciFile.from_lines(lines)))
예제 #4
0
 def test_interface_name_identification(self):
     with fake_filesystem_unittest.Patcher() as patcher:
         patcher.fs.create_file(
             '/mock', contents=test_interface_name_identification["input"])
         self.assertEqual(convert_to_yaml(CiscoConfParse('/mock')),
                          test_interface_name_identification["output"])
예제 #5
0
 def test_interface_power_inline_police(self):
     with fake_filesystem_unittest.Patcher() as patcher:
         patcher.fs.create_file(
             '/mock', contents=test_interface_power_inline_police["input"])
         self.assertEqual(convert_to_yaml(CiscoConfParse('/mock')),
                          test_interface_power_inline_police["output"])