def test_golden(self): self.device = Mock(**self.golden_output) obj = ShowVrf(device=self.device) parsed_output = obj.parse() self.assertEqual(parsed_output, self.golden_parsed_output)
def test_golden_vrf(self): self.device = Mock(**self.golden_output_vrf) obj = ShowVrf(device=self.device) parsed_output = obj.parse(vrf='VRF1') self.assertEqual(parsed_output, self.golden_parsed_output_vrf)
def test_empty(self): self.device = Mock(**self.empty_output) obj = ShowVrf(device=self.device) with self.assertRaises(SchemaEmptyParserError): parsed_output = obj.parse()