def test_perfoutput_01(self): log.info("Testing init NagiosPerformance output lap 1.") perf = NagiosPerformance(label = 'bla', value = 80, warning = '~:30', critical = '~:60', min_data = 0, max_data = 1000) log.debug("NagiosPerformance object: %r", perf) log.debug("perfoutput: %r", perf.perfoutput()) self.assertEqual(perf.perfoutput(), 'bla=80;~:30;~:60;0;1000', "Error testing perf.perfoutput()")
def test_perfoutput_00(self): log.info("Testing init NagiosPerformance output lap 0.") perf = NagiosPerformance(label = 'bla', value = 80, warning = '~:30', critical = '~:60', uom = 'MByte') log.debug("NagiosPerformance object: %r", perf) log.debug("perfoutput: %r", perf.perfoutput()) self.assertEqual(perf.perfoutput(), 'bla=80MByte;~:30;~:60', "Error testing perf.perfoutput()")