Exemple #1
0
  def testGetLogsPath(self, wpe):
    # WinPE
    wpe.return_value = True
    self.assertEqual(logs.GetLogsPath(), logs.constants.WINPE_LOGS_PATH)

    # Host
    wpe.return_value = False
    self.assertEqual(logs.GetLogsPath(), logs.constants.SYS_LOGS_PATH)
Exemple #2
0
 def __init__(self):
     self._logging = logging.Logger('log_copy')
     path = '%s\\log_copy.log' % logs.GetLogsPath()
     self._logging.addHandler(logging.FileHandler(path))