diff --git a/test/unit/tool_shed/test_shed_index.py b/test/unit/tool_shed/test_shed_index.py index bc929dcddfb1..880489151e2d 100644 --- a/test/unit/tool_shed/test_shed_index.py +++ b/test/unit/tool_shed/test_shed_index.py @@ -26,7 +26,9 @@ def whoosh_index_dir(): @pytest.fixture(scope="module") def community_file_dir(): extracted_archive_dir = tempfile.mkdtemp() - b = BytesIO(requests.get(URL).content) + response = requests.get(URL) + response.raise_for_status() + b = BytesIO(response.content) tarfile.open(fileobj=b, mode="r:gz").extractall(extracted_archive_dir) try: yield extracted_archive_dir