Skip to content

Commit

Permalink
Merge pull request #4156 from jmchilton/new_api_test_improvement
Browse files Browse the repository at this point in the history
More reporting in new transiently failing collection download test.
  • Loading branch information
martenson committed Jun 6, 2017
2 parents 9d1a382 + 7467bcf commit 5da6cb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/api/test_dataset_collections.py
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5da6cb7

Please sign in to comment.