Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
pipliggins committed Jun 28, 2024
1 parent 501a23b commit 8b0e399
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,27 @@ def test_convert_data_to_flat_local_mapping():
shutil.rmtree(output_folder)


def test_convert_data_to_flat_local_mapping_zipped():
output_folder = "tests/ingestion_output"
mappings = {
Encounter: "tests/dummy_data/encounter_dummy_mapping.csv",
}
resource_types = {"Encounter": "one-to-one"}

convert_data_to_flat(
"tests/dummy_data/combined_dummy_data.csv",
folder_name=output_folder,
date_format="%Y-%m-%d",
timezone="Brazil/East",
mapping_files_types=(mappings, resource_types),
compress_format="zip",
)

assert os.path.exists("tests/ingestion_output.zip")

os.remove("tests/ingestion_output.zip")


def test_ingest_to_flat_validation_errors():
df = pd.DataFrame(
{
Expand Down

0 comments on commit 8b0e399

Please sign in to comment.