Skip to content

Commit cd1af23

Browse files
Adrian Damianbsipocz
authored andcommitted
Fixed alma integration tests
1 parent cbec82e commit cd1af23

File tree

4 files changed

+62
-123
lines changed

4 files changed

+62
-123
lines changed

astroquery/alma/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
'https://almascience.nrao.edu',
1212
'https://almascience.nao.ac.jp']
1313

14-
_test_url_list = ['https://beta.cadc-ccda.hia-ha.nrc-cnrc.gc.ca']
15-
1614
auth_urls = ['asa.alma.cl', 'rh-cas.alma.cl']
1715

1816

@@ -27,11 +25,6 @@ class Conf(_config.ConfigNamespace):
2725
_url_list,
2826
'The ALMA Archive mirror to use.')
2927

30-
test_archive_url = _config.ConfigItem(
31-
_test_url_list,
32-
'ALMA Archive Test Mirrors (temporary)'
33-
)
34-
3528
auth_url = _config.ConfigItem(
3629
auth_urls,
3730
'ALMA Central Authentication Service URLs'

astroquery/alma/core.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def _HEADER_data_size(self, files):
677677
return data_sizes, totalsize.to(u.GB)
678678

679679
def download_files(self, files, savedir=None, cache=True,
680-
continuation=True, skip_unauthorized=True):
680+
continuation=True, skip_unauthorized=True,):
681681
"""
682682
Given a list of file URLs, download them
683683
@@ -711,8 +711,7 @@ def download_files(self, files, savedir=None, cache=True,
711711
for fileLink in unique(files):
712712
log.debug("Downloading {0} to {1}".format(fileLink, savedir))
713713
try:
714-
check_filename = self._request('HEAD', fileLink, auth=auth,
715-
stream=True)
714+
check_filename = self._request('HEAD', fileLink, auth=auth)
716715
check_filename.raise_for_status()
717716
except requests.HTTPError as ex:
718717
if ex.response.status_code == 401:
@@ -748,7 +747,7 @@ def download_files(self, files, savedir=None, cache=True,
748747
auth=auth,
749748
cache=cache,
750749
method='GET',
751-
head_safe=True,
750+
head_safe=False,
752751
continuation=continuation)
753752

754753
downloaded_files.append(filename)
@@ -777,7 +776,7 @@ def download_files(self, files, savedir=None, cache=True,
777776
auth=auth,
778777
cache=cache,
779778
method='GET',
780-
head_safe=True,
779+
head_safe=False,
781780
continuation=continuation)
782781

783782
downloaded_files.append(filename)
@@ -1107,7 +1106,7 @@ def download_and_extract_files(self, urls, delete=True, regex=r'.*\.fits$',
11071106
expanded_files += [x for x in files['access_url'] if
11081107
filere.match(x.split('/')[-1])]
11091108
else:
1110-
tar_files.append(tar_file)
1109+
tar_files.append(url)
11111110

11121111
try:
11131112
# get the tar files

0 commit comments

Comments
 (0)