diff --git a/models/contacts/tests/contacts.yml b/models/contacts/tests/contacts.yml index 282c8d08..acb049e8 100644 --- a/models/contacts/tests/contacts.yml +++ b/models/contacts/tests/contacts.yml @@ -17,57 +17,4 @@ unit_tests: expect: format: csv fixture: contact_initial_expected - - name: test_person_model_transformation_and_data_integrity - description: | - This unit test validates the transformation logic in the `person` model and ensures data integrity. - It uses fixture data for `contact` and `couchdb` to test the complete logic. - model: person - overrides: - macros: - is_incremental: false - given: - - input: ref('contact') - format: csv - fixture: person_contact_initial - - input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") - format: csv - fixture: person_source_table_initial - expect: - format: csv - fixture: person_initial_expected - - name: test_place_model_transformation_and_data_integrity - description: | - This unit test validates the transformation logic in the `place` model and ensures data integrity. - It uses fixture data for both `contact` and `couchdb` to test the complete logic. - model: place - overrides: - macros: - is_incremental: false - given: - - input: ref('contact') - format: csv - fixture: place_contact_initial - - input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") - format: csv - fixture: place_source_table_initial - expect: - format: csv - fixture: place_initial_expected - - name: test_patient_model_transformation_and_data_integrity - description: | - This unit test validates the transformation logic in the `patient` model and ensures data integrity. - It uses fixture data for both `person` and `couchdb` to test the complete logic. - model: patient - overrides: - macros: - is_incremental: false - given: - - input: ref('person') - format: csv - fixture: patient_person_initial - - input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") - format: csv - fixture: patient_source_table_initial - expect: - format: csv - fixture: patient_initial_expected + diff --git a/models/contacts/tests/patients.yml b/models/contacts/tests/patients.yml new file mode 100644 index 00000000..c960a5bf --- /dev/null +++ b/models/contacts/tests/patients.yml @@ -0,0 +1,19 @@ +unit_tests: + - name: test_patient_model_transformation_and_data_integrity + description: | + This unit test validates the transformation logic in the `patient` model and ensures data integrity. + It uses fixture data for both `person` and `couchdb` to test the complete logic. + model: patient + overrides: + macros: + is_incremental: false + given: + - input: ref('person') + format: csv + fixture: patient_person_initial + - input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") + format: csv + fixture: patient_source_table_initial + expect: + format: csv + fixture: patient_initial_expected diff --git a/models/contacts/tests/persons.yml b/models/contacts/tests/persons.yml new file mode 100644 index 00000000..00572dfa --- /dev/null +++ b/models/contacts/tests/persons.yml @@ -0,0 +1,19 @@ +unit_tests: + - name: test_person_model_transformation_and_data_integrity + description: | + This unit test validates the transformation logic in the `person` model and ensures data integrity. + It uses fixture data for `contact` and `couchdb` to test the complete logic. + model: person + overrides: + macros: + is_incremental: false + given: + - input: ref('contact') + format: csv + fixture: person_contact_initial + - input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") + format: csv + fixture: person_source_table_initial + expect: + format: csv + fixture: person_initial_expected diff --git a/models/contacts/tests/places.yml b/models/contacts/tests/places.yml new file mode 100644 index 00000000..9e17e8ff --- /dev/null +++ b/models/contacts/tests/places.yml @@ -0,0 +1,19 @@ +unit_tests: + - name: test_place_model_transformation_and_data_integrity + description: | + This unit test validates the transformation logic in the `place` model and ensures data integrity. + It uses fixture data for both `contact` and `couchdb` to test the complete logic. + model: place + overrides: + macros: + is_incremental: false + given: + - input: ref('contact') + format: csv + fixture: place_contact_initial + - input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") + format: csv + fixture: place_source_table_initial + expect: + format: csv + fixture: place_initial_expected diff --git a/test/fixtures/contact_document_metadata_initial.csv b/test/fixtures/contact/contact_document_metadata_initial.csv similarity index 100% rename from test/fixtures/contact_document_metadata_initial.csv rename to test/fixtures/contact/contact_document_metadata_initial.csv diff --git a/test/fixtures/contact_initial_expected.csv b/test/fixtures/contact/contact_initial_expected.csv similarity index 100% rename from test/fixtures/contact_initial_expected.csv rename to test/fixtures/contact/contact_initial_expected.csv diff --git a/test/fixtures/contact_source_table_initial.csv b/test/fixtures/contact/contact_source_table_initial.csv similarity index 100% rename from test/fixtures/contact_source_table_initial.csv rename to test/fixtures/contact/contact_source_table_initial.csv diff --git a/test/fixtures/data_record_document_metadata_initial.csv b/test/fixtures/data_record/data_record_document_metadata_initial.csv similarity index 100% rename from test/fixtures/data_record_document_metadata_initial.csv rename to test/fixtures/data_record/data_record_document_metadata_initial.csv diff --git a/test/fixtures/data_record_initial_expected.csv b/test/fixtures/data_record/data_record_initial_expected.csv similarity index 100% rename from test/fixtures/data_record_initial_expected.csv rename to test/fixtures/data_record/data_record_initial_expected.csv diff --git a/test/fixtures/data_record_source_table_initial.csv b/test/fixtures/data_record/data_record_source_table_initial.csv similarity index 100% rename from test/fixtures/data_record_source_table_initial.csv rename to test/fixtures/data_record/data_record_source_table_initial.csv diff --git a/test/fixtures/document_metadata_initial.csv b/test/fixtures/document_metadata/document_metadata_initial.csv similarity index 100% rename from test/fixtures/document_metadata_initial.csv rename to test/fixtures/document_metadata/document_metadata_initial.csv diff --git a/test/fixtures/document_metadata_initial_expected.csv b/test/fixtures/document_metadata/document_metadata_initial_expected.csv similarity index 100% rename from test/fixtures/document_metadata_initial_expected.csv rename to test/fixtures/document_metadata/document_metadata_initial_expected.csv diff --git a/test/fixtures/patient_initial_expected.csv b/test/fixtures/patient/patient_initial_expected.csv similarity index 100% rename from test/fixtures/patient_initial_expected.csv rename to test/fixtures/patient/patient_initial_expected.csv diff --git a/test/fixtures/patient_person_initial.csv b/test/fixtures/patient/patient_person_initial.csv similarity index 100% rename from test/fixtures/patient_person_initial.csv rename to test/fixtures/patient/patient_person_initial.csv diff --git a/test/fixtures/patient_source_table_initial.csv b/test/fixtures/patient/patient_source_table_initial.csv similarity index 100% rename from test/fixtures/patient_source_table_initial.csv rename to test/fixtures/patient/patient_source_table_initial.csv diff --git a/test/fixtures/person_contact_initial.csv b/test/fixtures/person/person_contact_initial.csv similarity index 100% rename from test/fixtures/person_contact_initial.csv rename to test/fixtures/person/person_contact_initial.csv diff --git a/test/fixtures/person_initial_expected.csv b/test/fixtures/person/person_initial_expected.csv similarity index 100% rename from test/fixtures/person_initial_expected.csv rename to test/fixtures/person/person_initial_expected.csv diff --git a/test/fixtures/person_source_table_initial.csv b/test/fixtures/person/person_source_table_initial.csv similarity index 100% rename from test/fixtures/person_source_table_initial.csv rename to test/fixtures/person/person_source_table_initial.csv diff --git a/test/fixtures/place_contact_initial.csv b/test/fixtures/place/place_contact_initial.csv similarity index 100% rename from test/fixtures/place_contact_initial.csv rename to test/fixtures/place/place_contact_initial.csv diff --git a/test/fixtures/place_initial_expected.csv b/test/fixtures/place/place_initial_expected.csv similarity index 100% rename from test/fixtures/place_initial_expected.csv rename to test/fixtures/place/place_initial_expected.csv diff --git a/test/fixtures/place_source_table_initial.csv b/test/fixtures/place/place_source_table_initial.csv similarity index 100% rename from test/fixtures/place_source_table_initial.csv rename to test/fixtures/place/place_source_table_initial.csv diff --git a/test/fixtures/user_document_metadata_initial.csv b/test/fixtures/user/user_document_metadata_initial.csv similarity index 100% rename from test/fixtures/user_document_metadata_initial.csv rename to test/fixtures/user/user_document_metadata_initial.csv diff --git a/test/fixtures/user_initial_expected.csv b/test/fixtures/user/user_initial_expected.csv similarity index 100% rename from test/fixtures/user_initial_expected.csv rename to test/fixtures/user/user_initial_expected.csv diff --git a/test/fixtures/user_source_table_initial.csv b/test/fixtures/user/user_source_table_initial.csv similarity index 100% rename from test/fixtures/user_source_table_initial.csv rename to test/fixtures/user/user_source_table_initial.csv