Пример #1
0
 def test_show_ospf_interface_interface_brief(self):
     self.device = Mock(**self.golden_output_interface)
     obj = ShowOspfInterfaceBrief(device=self.device)
     parsed_output = obj.parse(interface='ge-0/0/4.0')
     self.assertEqual(parsed_output, self.golden_parsed_output_interface)
Пример #2
0
 def test_show_ospf_interface_brief_empty(self):
     self.device = Mock(**self.empty_output)
     obj = ShowOspfInterfaceBrief(device=self.device)
     with self.assertRaises(SchemaEmptyParserError):
         obj.parse()
Пример #3
0
 def test_show_ospf_interface_brief_instance_master(self):
     self.device = Mock(**self.golden_output_master)
     obj = ShowOspfInterfaceBrief(device=self.device)
     parsed_output = obj.parse(instance='master')
     self.assertEqual(parsed_output, self.golden_parsed_output_master)
Пример #4
0
 def test_show_ospf(self):
     self.maxDiff = None
     self.device = Mock(**self.golden_output)
     obj = ShowOspfInterfaceBrief(device=self.device)
     parsed_output = obj.parse()
     self.assertEqual(parsed_output, self.golden_parsed_output)