Revision 8a7f1c61 test/ganeti.cli_unittest.py

b/test/ganeti.cli_unittest.py
418 418
    cbs.CheckEmpty()
419 419

  
420 420

  
421
class TestFormatLogMessage(unittest.TestCase):
422
  def test(self):
423
    self.assertEqual(cli.FormatLogMessage(constants.ELOG_MESSAGE,
424
                                          "Hello World"),
425
                     "Hello World")
426
    self.assertRaises(TypeError, cli.FormatLogMessage,
427
                      constants.ELOG_MESSAGE, [1, 2, 3])
428

  
429
    self.assert_(cli.FormatLogMessage("some other type", (1, 2, 3)))
430

  
431

  
421 432
if __name__ == '__main__':
422 433
  testutils.GanetiTestProgram()

Also available in: Unified diff