Skip to content

Commit

Permalink
Merge pull request #2842 from zoghbi-a/fix-heasarc-tests
Browse files Browse the repository at this point in the history
Fix heasarc tests
  • Loading branch information
bsipocz committed Oct 24, 2023
2 parents 4e1d4fe + c4f6ff4 commit ff01bc1
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def save_response_of_get(session, method, url, params=None, timeout=10, **kwargs
return MockResponse(text)


@pytest.fixture(autouse=True)
@pytest.fixture()
def patch_get(request):
"""
If the mode is not remote, patch `requests.Session` to either return saved local data
Expand Down
2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/data/404652d5.dat

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/data/4511b20b.dat

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/data/6ad7a587.dat

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/data/6df5af53.dat

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/data/f6d793e8.dat

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion astroquery/heasarc/tests/data/ff1f8d6a.dat

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions astroquery/heasarc/tests/test_heasarc_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

@parametrization_local_save_remote
class TestHeasarc:

@pytest.fixture(autouse=True)
def _patch_get(self, patch_get):
return patch_get

def test_custom_args(self):
object_name = 'Crab'
mission = 'intscw'
Expand Down
6 changes: 5 additions & 1 deletion astroquery/heasarc/tests/test_heasarc_remote_isdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
@parametrization_local_save_remote
class TestHeasarcISDC:

@pytest.fixture(autouse=True)
def _patch_get(self, patch_get):
return patch_get

@property
def isdc_context(self):
return Conf.server.set_temp(
Expand Down Expand Up @@ -176,7 +180,7 @@ def test_mission_cols(self):
assert 'GOOD_ISGRI' in cols
assert 'RA_X' in cols
assert 'DEC_X' in cols
assert '_SEARCH_OFFSET' in cols
assert 'SEARCH_OFFSET_' in cols

def test_query_object_async(self):
mission = 'integral_rev3_scw'
Expand Down

0 comments on commit ff01bc1

Please sign in to comment.