예제 #1
0
 def test_update_and_set_facility(self):
     self.assertFalse("TEST" in config.getFacilityNames())
     ConfigService.updateFacilities(
         os.path.join(ConfigService.getInstrumentDirectory(),
                      "IDFs_for_UNIT_TESTING/UnitTestFacilities.xml"))
     ConfigService.setFacility("TEST")
     self.assertEquals(config.getFacility().name(), "TEST")
     self.assertRaises(RuntimeError, config.getFacility, "SNS")
예제 #2
0
 def test_update_and_set_facility(self):
     self.assertFalse("TEST" in config.getFacilityNames())
     ConfigService.updateFacilities(
         os.path.join(ConfigService.getInstrumentDirectory(), "IDFs_for_UNIT_TESTING/UnitTestFacilities.xml")
     )
     ConfigService.setFacility("TEST")
     self.assertEquals(config.getFacility().name(), "TEST")
     self.assertRaises(RuntimeError, config.getFacility, "SNS")
예제 #3
0
 def get_ipf_for_rule_2(path):
     # Check if can be found in the instrument folder
     directory = ConfigService.getInstrumentDirectory()
     return check_for_files(directory, path)
예제 #4
0
 def get_ipf_for_rule_2(path):
     # Check if can be found in the instrument folder
     directory = ConfigService.getInstrumentDirectory()
     return check_for_files(directory, path)