Beispiel #1
0
 def test_successVM(self):
     with mock.patch.dict(os.environ, {
             'VM_UUID': 'VM_uuid',
             'CE_NAME': 'myCE',
             'VMTYPE': 'myVMTYPE'
     }):
         self.assertEqual(getUniqueIDFromOS(),
                          'vm://myCE/myCE:myVMTYPE:VM_uuid')
 def test_failVM( self, mock_environ_get, mock_environ_key):
   self.assertFalse(getUniqueIDFromOS())
 def test_successVM( self, mock_environ_get, mock_environ_key):
   self.assertEqual(getUniqueIDFromOS(), 'vm://myCE/myCE:myVMTYPE:VM_uuid')
 def test_successGRID( self, mock_environ_get, mock_environ_key):
   self.assertEqual(getUniqueIDFromOS(), 'GRID_uuid')
 def test_successCREAM( self, mock_environ_get, mock_environ_key):
   self.assertEqual(getUniqueIDFromOS(), 'CREAM_uuid')
Beispiel #6
0
 def test_failVM( self, mock_environ_get, mock_environ_key):
   self.assertFalse(getUniqueIDFromOS())
Beispiel #7
0
 def test_successVM( self, mock_environ_get, mock_environ_key):
   self.assertEqual(getUniqueIDFromOS(), 'vm://myCE/myCE:myVMTYPE:VM_uuid')
Beispiel #8
0
 def test_successGRID( self, mock_environ_get, mock_environ_key):
   self.assertEqual(getUniqueIDFromOS(), 'GRID_uuid')
Beispiel #9
0
 def test_successCREAM( self, mock_environ_get, mock_environ_key):
   self.assertEqual(getUniqueIDFromOS(), 'CREAM_uuid')
 def test_failVM(self):
     self.assertFalse(getUniqueIDFromOS())
 def test_successVM(self):
     with mock.patch.dict(os.environ, {"VM_UUID": "VM_uuid", "CE_NAME": "myCE", "VMTYPE": "myVMTYPE"}):
         self.assertEqual(getUniqueIDFromOS(), "vm://myCE/myCE:myVMTYPE:VM_uuid")
 def test_successGRID(self):
     with mock.patch.dict(os.environ, {"GRID_GLOBAL_JOBID": "GRID_uuid"}):
         self.assertEqual(getUniqueIDFromOS(), "GRID_uuid")
 def test_successCREAM(self):
     with mock.patch.dict(os.environ, {"CREAM_JOBID": "CREAM_uuid"}):
         self.assertEqual(getUniqueIDFromOS(), "CREAM_uuid")
Beispiel #14
0
 def test_successCREAM(self):
     with mock.patch.dict(os.environ, {'CREAM_JOBID': 'CREAM_uuid'}):
         self.assertEqual(getUniqueIDFromOS(), 'CREAM_uuid')