Skip to content

Commit

Permalink
test: Add more tests for getTransformationFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Oct 2, 2024
1 parent b24a791 commit bb68be7
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ def test_addTasksAndFiles(self):
for f in res["Value"]:
self.assertEqual(f["Status"], TransformationFilesStatus.ASSIGNED)

# make sure we can selectively select LFNs
res = self.transClient.getTransformationFiles({"TransformationID": transID, "LFN": ["/aa/lfn.1.txt"]})
assert res["OK"], res
assert len(res["Value"]) == 1, res
assert res["ParameterNames"][0] == ["LFN"], res
assert "TargetSE" in res["ParameterNames"][0], res
assert isinstance(res["Records"][0], list), res

# make sure we can selectively select columns
res = self.transClient.getTransformationFiles({"TransformationID": transID}, columns=["LFN", "Status"])
assert res["OK"], res
assert res["Value"][0].keys() == ["LFN", "Status"], res
assert res["ParameterNames"] == ["LFN", "Status"], res
assert isinstance(res["Records"][0], list), res

# now adding a new Transformation with new tasks, and introducing a mix of insertion,
# to test that the trigger works as it should
res = self.transClient.addTransformation(
Expand Down

0 comments on commit bb68be7

Please sign in to comment.