def test_golden(self): self.device = Mock(**self.golden_output) interface_obj = ShowInterfacesTerseMatch(device=self.device) parsed_output = interface_obj.parse(interface='fxp0') self.assertEqual(parsed_output, self.golden_parsed_output)
def test_empty(self): self.device1 = Mock(**self.empty_output) interface_obj = ShowInterfacesTerseMatch(device=self.device1) with self.assertRaises(SchemaEmptyParserError): interface_obj.parse()