Skip to content

Commit

Permalink
organize tests and fixtures by model
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Lorena Rodriguez Viruel committed Aug 29, 2024
1 parent 2c8629a commit 66a0d9d
Show file tree
Hide file tree
Showing 24 changed files with 58 additions and 54 deletions.
55 changes: 1 addition & 54 deletions models/contacts/tests/contacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

19 changes: 19 additions & 0 deletions models/contacts/tests/patients.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions models/contacts/tests/persons.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions models/contacts/tests/places.yml
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 66a0d9d

Please sign in to comment.