From b5bc870fa1dc5551f6a2fc85c4ee2e7284d922ea Mon Sep 17 00:00:00 2001 From: ErnestaP Date: Wed, 14 Aug 2024 17:07:05 +0200 Subject: [PATCH] IOP: repo test fix --- data/iop/{aca95c.xml.zip => aca95c.zip} | Bin tests/integration/iop/test_iop_dag_pull_sftp.py | 4 ++-- tests/integration/iop/test_repo.py | 4 ++-- tests/units/iop/test_iop_sftp.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename data/iop/{aca95c.xml.zip => aca95c.zip} (100%) diff --git a/data/iop/aca95c.xml.zip b/data/iop/aca95c.zip similarity index 100% rename from data/iop/aca95c.xml.zip rename to data/iop/aca95c.zip diff --git a/tests/integration/iop/test_iop_dag_pull_sftp.py b/tests/integration/iop/test_iop_dag_pull_sftp.py index 9593b040..a9b331da 100644 --- a/tests/integration/iop/test_iop_dag_pull_sftp.py +++ b/tests/integration/iop/test_iop_dag_pull_sftp.py @@ -82,7 +82,7 @@ def test_dag_run(dag, dag_was_paused: bool, iop_empty_repo): "pdf": "extracted/2022-09-24T03_01_43_content/1674-1137/1674-1137_46/1674-1137_46_10/1674-1137_46_10_103108/cpc_46_10_103108.pdf", "xml": "extracted/2022-09-24T03_01_43_content/1674-1137/1674-1137_46/1674-1137_46_10/1674-1137_46_10_103108/cpc_46_10_103108.xml", }, - {"xml": "extracted/aca95c.xml/aca95c.xml"}, + {"xml": "extracted/aca95c/aca95c.xml"}, ] assert sorted(iop_empty_repo.find_all(), key=lambda x: x.get("xml", "")) == sorted( @@ -155,7 +155,7 @@ def test_dag_migrate_from_FTP(iop_empty_repo): "pdf": "extracted/2022-09-24T03_01_43_content/1674-1137/1674-1137_46/1674-1137_46_10/1674-1137_46_10_103108/cpc_46_10_103108.pdf", "xml": "extracted/2022-09-24T03_01_43_content/1674-1137/1674-1137_46/1674-1137_46_10/1674-1137_46_10_103108/cpc_46_10_103108.xml", }, - {"xml": "extracted/aca95c.xml/aca95c.xml"}, + {"xml": "extracted/aca95c/aca95c.xml"}, ] for (file_from_repo, expected_file) in zip( iop_empty_repo.find_all(), expected_files diff --git a/tests/integration/iop/test_repo.py b/tests/integration/iop/test_repo.py index 4b6d36bc..36d6b1a5 100644 --- a/tests/integration/iop/test_repo.py +++ b/tests/integration/iop/test_repo.py @@ -75,7 +75,7 @@ def test_pull_from_sftp(iop_empty_repo): "pdf": "extracted/2022-09-24T03_01_43_content/1674-1137/1674-1137_46/1674-1137_46_10/1674-1137_46_10_103108/cpc_46_10_103108.pdf", "xml": "extracted/2022-09-24T03_01_43_content/1674-1137/1674-1137_46/1674-1137_46_10/1674-1137_46_10_103108/cpc_46_10_103108.xml", }, - {"xml": "extracted/aca95c.xml/aca95c.xml"}, + {"xml": "extracted/aca95c/aca95c.xml"}, ] assert iop_empty_repo.find_all() == expected_files assert sorted(iop_empty_repo.get_all_raw_filenames()) == sorted( @@ -84,6 +84,6 @@ def test_pull_from_sftp(iop_empty_repo): "2022-09-01T03_01_40_content.zip", "2022-09-03T03_01_49_content.zip", "2022-09-24T03_01_43_content.zip", - "aca95c.xml.zip", + "aca95c.zip", ] ) diff --git a/tests/units/iop/test_iop_sftp.py b/tests/units/iop/test_iop_sftp.py index c23fd15e..71148cc5 100644 --- a/tests/units/iop/test_iop_sftp.py +++ b/tests/units/iop/test_iop_sftp.py @@ -10,6 +10,6 @@ def test_iop_sftp_path(): "2022-09-01T03_01_40_content.zip", "2022-09-03T03_01_49_content.zip", "2022-09-24T03_01_43_content.zip", - "aca95c.xml.zip", + "aca95c.zip", ] )