def test_localworkdir_jobid(self):
     with patch('hod.config.template._current_user',
                return_value='username'):
         with patch('os.getpid', return_value='123'):
             with patch('socket.getfqdn', return_value='hostname'):
                 with patch('os.getenv', return_value='jobid'):
                     self.assertEqual(
                         'workdir/hod/jobid/username.hostname.123',
                         hct.mklocalworkdir('workdir'))
示例#2
0
 def localworkdir(self):
     return hct.mklocalworkdir(self._tr.workdir)
示例#3
0
 def localworkdir(self):
     return hct.mklocalworkdir(self._tr.workdir)
示例#4
0
 def test_localworkdir_jobid(self):
     with patch('hod.config.template._current_user', return_value='username'):
         with patch('os.getpid', return_value='123'):
             with patch('socket.getfqdn', return_value='hostname'):
                 with patch('os.getenv', return_value='jobid'):
                     self.assertEqual('workdir/hod/jobid/username.hostname.123', hct.mklocalworkdir('workdir'))