def test_golden6(self): self.device1 = Mock(**self.golden_output6) obj = ShowRunInterface(device=self.device1) parsed_output = obj.parse(interface='GigabitEthernet0/0/0') self.assertEqual(parsed_output, self.golden_parsed_output6)
def test_golden5(self): self.device1 = Mock(**self.golden_output5) obj = ShowRunInterface(device=self.device1) parsed_output = obj.parse(interface='Loopback1') self.assertEqual(parsed_output, self.golden_parsed_output5)
def test_golden(self): self.device1 = Mock(**self.golden_output) obj = ShowRunInterface(device=self.device1) parsed_output = obj.parse(interface='Gi1/0/13') self.assertEqual(parsed_output, self.golden_parsed_output)
def test_golden2(self): self.device1 = Mock(**self.golden_output2) obj = ShowRunInterface(device=self.device1) parsed_output = obj.parse(interface='Port-channel1.100') self.assertEqual(parsed_output, self.golden_parsed_output2)
def test_empty(self): self.device1 = Mock(**self.empty_output) obj = ShowRunInterface(device=self.device1) with self.assertRaises(SchemaEmptyParserError): parsed_output = obj.parse(interface='GigabitEthernet0/0/0')