def test_HtmlFileLoggerSetFilePath(self):
     html_logger = HtmlFileLogger("", True, MessageType.GENERIC,
                                  "HtmlFileLoggerSetFilePath")
     html_logger.set_file_path("test file path")
     file_path = html_logger.get_file_path()
     # os.remove(html_logger.get_file_path())
     self.assertFalse(path.exists(html_logger.get_file_path()))
     self.assertEquals(file_path, "test file path",
                       "Expected 'test file path' as file path")
    def test_HtmlFileLoggerCatchThrownException(self):
        html_logger = HtmlFileLogger(True, "",
                                     "HtmlFileLoggerCatchThrownException",
                                     MessageType.GENERIC)
        html_logger.set_file_path("<>")
        html_logger.log_message(MessageType.GENERIC,
                                "Test throws error as expected.")

        file_path = html_logger.get_file_path(
        ) + "\\" + html_logger.get_file_name()
        self.assertTrue(path.exists(file_path))