Ejemplo n.º 1
0
 def test_helium_logger_unicode_handling(self):
     """ Test simple XML logging generation with unicode handling. """
     mclogger = helium.logger.Logger()
     mclogger.SetInterface("http://fawww.europe.company.com/isis/isis_interface/")
     mclogger.SetTitle("Validate Overlay")
     mclogger.SetSubTitle("Validating: ")
     mclogger.OpenMainContent("test")
     mclogger.Print(u"Test unicode handling: \u00A9")
     mclogger.CloseMainContent()
     mclogger.WriteToFile('log.xml')
     
     logger.info(mclogger)
     
     os.unlink('log.xml')
Ejemplo n.º 2
0
 def test_mc_logger_xml_generation(self):
     """ Test simple XML logging generation. """
     mclogger = helium.logger.Logger()
     mclogger.SetInterface("http://fawww.europe.company.com/isis/isis_interface/")
     mclogger.SetTitle("Validate Overlay")
     mclogger.SetSubTitle("Validating: ")
     mclogger.OpenMainContent("test")
     mclogger.PrintRaw("<a href=\"google.com\">test</a>")
     mclogger.Print("test")
     mclogger.Print(u"\u00A9")
     mclogger.error("test")
     mclogger.CloseMainContent()
     mclogger.OpenMainContent("test2")
     mclogger.OpenEvent("test2")
     mclogger.Print("test2")
     mclogger.error("test2")
     mclogger.CloseEvent()
     mclogger.CloseMainContent()
     mclogger.WriteToFile('log.xml')
     
     logger.info(mclogger)
     
     os.unlink('log.xml')