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"])
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)))
def test_beardropper(self): lines = test_beardropper["input"].split("\n") self.assertEqual(test_beardropper["output"], convert_to_yaml(uci.UciFile.from_lines(lines)))
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"])
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"])