コード例 #1
0
 def test_golden_standby_offline(self):
     self.device = Mock(**self.golden_output_standby_offline)
     obj = ShowVersionRp(device=self.device)
     self.maxDiff = None
     with self.assertRaises(SchemaEmptyParserError):
         parsed_output = obj.parse(rp='standby', status='running')
コード例 #2
0
 def test_empty(self):
     self.device1 = Mock(**self.empty_output)
     obj = ShowVersionRp(device=self.device1)
     with self.assertRaises(SchemaEmptyParserError):
         parsed_output = obj.parse()
コード例 #3
0
 def test_golden_standby(self):
     self.device = Mock(**self.golden_output_standby)
     obj = ShowVersionRp(device=self.device)
     parsed_output = obj.parse(rp='standby', status='running')
     self.maxDiff = None
     self.assertEqual(parsed_output, self.golden_parsed_output_standby)