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")
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")
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)