Mercurial > hg > orthanc-tests
changeset 745:c2e87b7830c6 find-refactoring
fix transfer tests
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Wed, 27 Nov 2024 11:40:39 +0100 |
parents | cbc99698719d |
children | 2bef90799dd0 |
files | NewTests/Concurrency/test_transfer.py |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NewTests/Concurrency/test_transfer.py Wed Nov 27 09:35:49 2024 +0100 +++ b/NewTests/Concurrency/test_transfer.py Wed Nov 27 11:40:39 2024 +0100 @@ -86,7 +86,10 @@ # check the computed count tags studies = ob.get_json("/studies?requested-tags=NumberOfStudyRelatedInstances;NumberOfStudyRelatedSeries&expand=true") for study in studies: - self.assertEqual(400, int(study['RequestedTags']['NumberOfStudyRelatedInstances'])) + instance_count_a = len(oa.studies.get_instances_ids(study["ID"])) + instance_count_b = len(ob.studies.get_instances_ids(study["ID"])) + self.assertEqual(instance_count_a, instance_count_b) + self.assertEqual(instance_count_a, int(study['RequestedTags']['NumberOfStudyRelatedInstances'])) self.assertEqual(2, int(study['RequestedTags']['NumberOfStudyRelatedSeries'])) ob.delete_all_content() @@ -121,9 +124,12 @@ self.assertEqual(disk_size, oa.get_statistics().total_disk_size) # check the computed count tags - studies = self.oa.get_json("/studies?requested-tags=NumberOfStudyRelatedInstances;NumberOfStudyRelatedSeries&expand=true") + studies = oa.get_json("/studies?requested-tags=NumberOfStudyRelatedInstances;NumberOfStudyRelatedSeries&expand=true") for study in studies: - self.assertEqual(400, int(study['RequestedTags']['NumberOfStudyRelatedInstances'])) + instance_count_a = len(oa.studies.get_instances_ids(study["ID"])) + instance_count_b = len(ob.studies.get_instances_ids(study["ID"])) + self.assertEqual(instance_count_a, instance_count_b) + self.assertEqual(instance_count_a, int(study['RequestedTags']['NumberOfStudyRelatedInstances'])) self.assertEqual(2, int(study['RequestedTags']['NumberOfStudyRelatedSeries'])) oa.delete_all_content()