def test_pipeline_exists(self): # logging.basicConfig(stream=sys.stdout) pipeline = get_global_test_pipeline() self.assertIsNotNone(pipeline) self.assertIsNotNone(pipeline.dwh) self.assertIsNotNone(pipeline.dwh.dv) self.assertIsNotNone(pipeline.dwh.sys)
def setUp(self): if not TestCase_Validations.is_init: print('init_db') init_db() TestCase_Validations.is_init = True self.pipeline = get_global_test_pipeline() self.pipe = self.pipeline.get_or_create_pipe('test_system', config=test_system_config) self.pipe.register_domain(_domainmodel) self.pipe.mappings = [] self.pipe.mappings.extend(init_source_to_sor_mappings()) self.pipe.mappings.extend(init_sor_to_dv_mappings(self.pipe.sor)) validations = [] validation = SorValidation(tbl='patient_hstage', schema=self.pipe.sor) validation.msg = 'Ongeldige postcode' validation.sql_condition = "postcode like '0000%'" validations.append(validation) validation = SorValidation(tbl='patient_hstage', schema=self.pipe.sor) validation.msg = 'Ongeldig geslacht' validation.sql_condition = "geslacht not in ('m', 'v')" validations.append(validation) validation = DvValidation() validation.msg = '102 is ongeldig' validation.set_condition(Patient.Hub.bk == '102_test') validations.append(validation) validation = DvValidation() validation.msg = 'te jong' validation.set_condition(Patient.Default.geboortedatum >= '2000-01-01') validations.append(validation) self.pipe.validations.extend(validations)
def setUp(self): if not TestCase_RunProces.is_init: init_db() TestCase_RunProces.is_init = True self.pipeline = get_global_test_pipeline() self.pipe = self.pipeline.get_or_create_pipe('test_system', config=test_system_config) self.pipe.register_domain(_domainmodel) self.pipe.mappings = [] self.pipe.mappings.extend(init_tabsource_to_sor_mappings())
def setUp(self): if not TestCase_DbFunctions.is_init: init_db() TestCase_DbFunctions.is_init = True self.pipeline = get_global_test_pipeline() self.pipe = self.pipeline.get_or_create_pipe('test_system') self.pipe.register_domain(_domainmodel) self.pipe.register_db_functions(_db_functions, self.pipe.sor) self.pipe.mappings = [] self.pipe.mappings.extend(init_source_to_sor_mappings()) self.pipe.mappings.extend(init_sor_to_dv_mappings(self.pipe.sor))
def setUp(self): self.pipeline = get_global_test_pipeline() self.pipe = self.pipeline.get_or_create_pipe('test_system')