def test_getKnownDetModels2( self ):
   """test getKnownDetectorModels success.........................................................."""
   ddsim = DDSim()
   ddsim.version = "test"
   import DIRAC
   ddsim._ops = create_autospec(DIRAC.ConfigurationSystem.Client.Helpers.Operations.Operations, spec_set=True)
   ddsim._ops.getOptionsDict.return_value = S_OK({"detModel1":"/path", "detModel2":"/path2"})
   ret = ddsim.getKnownDetectorModels()
   self.assertIn( "detModel1", ret['Value'] )
   self.assertTrue( ret['OK'] )
Esempio n. 2
0
 def test_getKnownDetModels2(self):
     """test getKnownDetectorModels success.........................................................."""
     ddsim = DDSim()
     ddsim.version = "test"
     import DIRAC
     ddsim._ops = create_autospec(
         DIRAC.ConfigurationSystem.Client.Helpers.Operations.Operations,
         spec_set=True)
     ddsim._ops.getOptionsDict.return_value = S_OK({
         "detModel1": "/path",
         "detModel2": "/path2"
     })
     ret = ddsim.getKnownDetectorModels()
     self.assertIn("detModel1", ret['Value'])
     self.assertTrue(ret['OK'])
Esempio n. 3
0
 def test_getKnownDetModels1(self):
     """test getKnownDetectorModels failure no version..............................................."""
     ddsim = DDSim()
     ret = ddsim.getKnownDetectorModels()
     self.assertFalse(ret['OK'])
     self.assertEqual("No software version defined", ret['Message'])
 def test_getKnownDetModels1( self ):
   """test getKnownDetectorModels failure no version..............................................."""
   ddsim = DDSim()
   ret = ddsim.getKnownDetectorModels()
   self.assertFalse( ret['OK'] )
   self.assertEqual( "No software version defined", ret['Message'] )