Example #1
0
 def test_golden(self):
     self.device = Mock(**self.golden_output)
     obj = Ifconfig(device=self.device)
     parsed_output = obj.parse()
     self.maxDiff = None
     self.assertEqual(parsed_output, self.golden_parsed_output)
Example #2
0
 def test_golden_interface(self):
     self.device = Mock(**self.golden_output_interface)
     obj = Ifconfig(device=self.device)
     parsed_output = obj.parse(interface='eth1')
     self.maxDiff = None
     self.assertEqual(parsed_output, self.golden_parsed_output_interface)
Example #3
0
 def test_empty(self):
     self.device1 = Mock(**self.empty_output)
     obj = Ifconfig(device=self.device1)
     with self.assertRaises(SchemaEmptyParserError):
         parsed_output = obj.parse()