From 7467bcf10192a1bda3e4edec5afe86a8b7b5b882 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 6 Jun 2017 11:40:54 -0400 Subject: [PATCH] More reporting in new transiently failing collection download test. --- test/api/test_dataset_collections.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/api/test_dataset_collections.py b/test/api/test_dataset_collections.py index ae15c21c6642..567c56eb0939 100644 --- a/test/api/test_dataset_collections.py +++ b/test/api/test_dataset_collections.py @@ -105,7 +105,7 @@ def test_list_download(self): self._assert_status_code_is(create_response, 200) tar_contents = tarfile.open(fileobj=StringIO(create_response.content)) namelist = tar_contents.getnames() - assert len(namelist) == 3 + assert len(namelist) == 3, "Expected 3 elements in [%s]" % namelist collection_name = dataset_collection['name'] for element, zip_path in zip(returned_datasets, namelist): assert "%s/%s.%s" % (collection_name, element['element_identifier'], element['object']['file_ext']) == zip_path @@ -120,7 +120,7 @@ def test_pair_download(self): self._assert_status_code_is(create_response, 200) tar_contents = tarfile.open(fileobj=StringIO(create_response.content)) namelist = tar_contents.getnames() - assert len(namelist) == 2 + assert len(namelist) == 2, "Expected 2 elements in [%s]" % namelist collection_name = dataset_collection['name'] for element, zip_path in zip(returned_datasets, namelist): assert "%s/%s.%s" % (collection_name, element['element_identifier'], element['object']['file_ext']) == zip_path @@ -137,7 +137,7 @@ def test_list_pair_download(self): self._assert_status_code_is(create_response, 200) tar_contents = tarfile.open(fileobj=StringIO(create_response.content)) namelist = tar_contents.getnames() - assert len(namelist) == 2 + assert len(namelist) == 2, "Expected 2 elements in [%s]" % namelist pair_collection_name = pair['element_identifier'] for element, zip_path in zip(pair['object']['elements'], namelist): assert "%s/%s/%s.%s" % (list_collection_name, pair_collection_name, element['element_identifier'], element['object']['file_ext']) == zip_path