예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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')