def setUpClass(self): self.sudo_pwd = None if 'WB_SUDO_PASSWD' in os.environ: self.sudo_pwd = os.environ['WB_SUDO_PASSWD'] else: print '---> WB_SUDO_PASSWD is not defined, skipping TestFileOpsLinuxBase Admin Tests' self.process_ops = target_module.ProcessOpsLinuxLocal( sudo_prefix='/usr/bin/sudo -S -k -p EnterPasswordHere', ssh=None) self.target_class = target_module.FileOpsLocalUnix( self.process_ops, None, 'linux') self.user_home = os.path.expanduser('~') self.test_files = [] self.test_files.append( os.path.join(self.user_home, '__testing_file.txt')) self.test_files.append( os.path.join(self.user_home, '__testing file.txt')) self.test_folders = [] self.test_folders.append( os.path.join(self.user_home, '__testing_folder')) self.test_folders.append( os.path.join(self.user_home, '__testing folder'))
def setUpClass(self): self.sudo_pwd = None if 'WB_SUDO_PASSWD' in os.environ: self.sudo_pwd = os.environ['WB_SUDO_PASSWD'] else: print '---> WB_SUDO_PASSWD is not defined, skipping TestFileOpsLinuxBase Admin Tests' self.target_class = target_module.ProcessOpsLinuxLocal(sudo_prefix = '/usr/bin/sudo -S -k -p EnterPasswordHere', ssh=None)