Skip to content
Snippets Groups Projects
Commit fdf52f54 authored by Daniel Nemergut's avatar Daniel Nemergut
Browse files

Added a test for copying a flagtargetstemplate.txt into rawdata

parent aaf04517
No related branches found
No related tags found
2 merge requests!1669Catchup with main,!1640WS-1975 Image flagtemplate rawdata
Pipeline #15283 failed
......@@ -78,6 +78,19 @@ class TestGeneralFoundation:
general.data_foundation()
assert mock_copy.call_count == 2
@patch("pathlib.Path.glob", return_value=["TSKY0001_split.flagtargetstemplate.txt"])
@patch("pathlib.Path.exists", return_value=True)
@patch("shutil.copy")
def test_general_copy_into_rawdata(self, mock_copy, mock_exists, mock_glob):
general.copy_into_rawdata()
assert mock_exists.call_count == 1
assert mock_copy.call_count == 1
assert mock_glob.call_count == 1
# Ensure copy was called on the expected files
rawdata_dir_path = Path('/lustre/aoc/cluster/pipeline/docker/workspaces/spool/tmpo1ca1pp_/rawdata')
mock_copy.assert_any_call("TSKY0001_split.flagtargetstemplate.txt", rawdata_dir_path)
class TestRestoreFoundation:
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment