Skip to content

Commit

Permalink
INTEGRALSWRQ-158: download methods replaced by get only
Browse files Browse the repository at this point in the history
  • Loading branch information
jespinosaar committed Jan 21, 2025
1 parent ed9348f commit 0bc450b
Show file tree
Hide file tree
Showing 13 changed files with 458 additions and 771 deletions.
437 changes: 102 additions & 335 deletions astroquery/esa/integral/core.py

Large diffs are not rendered by default.

Binary file added astroquery/esa/integral/tests/data/lt.zip
Binary file not shown.
Binary file added astroquery/esa/integral/tests/data/mosaic.tar.gz
Binary file not shown.
Binary file added astroquery/esa/integral/tests/data/spectra.tar
Binary file not shown.
Binary file added astroquery/esa/integral/tests/data/st.tar
Binary file not shown.
2 changes: 1 addition & 1 deletion astroquery/esa/integral/tests/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_mock_mosaic():
}]


def get_mock_response(message):
def get_mock_response():
error_message = "Mocked HTTP error"
mock_response = Mock()
mock_response.raise_for_status.side_effect = HTTPError(error_message)
Expand Down
18 changes: 18 additions & 0 deletions astroquery/esa/integral/tests/setup_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os


# setup paths to the test data
# can specify a single file or a list of files
def get_package_data():
paths = [os.path.join('data', '*.vot'),
os.path.join('data', '*.xml'),
os.path.join('data', '*.zip'),
os.path.join('data', '*.gz'),
os.path.join('data', '*.tar'),
os.path.join('data', '*.fits'),
os.path.join('data', '*.txt'),
] # etc, add other extensions
# you can also enlist files individually by names
# finally construct and return a dict for the sub module
return {'astroquery.esa.integral.tests': paths}
260 changes: 114 additions & 146 deletions astroquery/esa/integral/tests/test_isla_tap.py

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions astroquery/esa/utils/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
================
UTILS Tests Init
================
European Space Astronomy Centre (ESAC)
European Space Agency (ESA)
"""
18 changes: 18 additions & 0 deletions astroquery/esa/utils/tests/setup_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os


# setup paths to the test data
# can specify a single file or a list of files
def get_package_data():
paths = [os.path.join('data', '*.vot'),
os.path.join('data', '*.xml'),
os.path.join('data', '*.zip'),
os.path.join('data', '*.gz'),
os.path.join('data', '*.tar'),
os.path.join('data', '*.fits'),
os.path.join('data', '*.txt'),
] # etc, add other extensions
# you can also enlist files individually by names
# finally construct and return a dict for the sub module
return {'astroquery.esa.utils.tests': paths}
10 changes: 10 additions & 0 deletions astroquery/esa/utils/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
===============
ESA UTILS tests
===============
European Space Astronomy Centre (ESAC)
European Space Agency (ESA)
"""
Loading

0 comments on commit 0bc450b

Please sign in to comment.