Skip to content

Commit e1dbfa4

Browse files
Jorge Fernandez HernandezJorge Fernandez Hernandez
authored andcommitted
EUCLIDPCR-1914 new test
1 parent c2db3c6 commit e1dbfa4

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

astroquery/esa/euclid/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ def get_datalinks(self, ids, *, linking_parameter='SOURCE_ID', verbose=False):
12311231
12321232
Parameters
12331233
----------
1234-
ids : str, int, str list or int list, mandatory
1234+
ids : str, int, list of str or list of int, mandatory
12351235
list of identifiers
12361236
linking_parameter : str, optional, default SOURCE_ID, valid values: SOURCE_ID
12371237
By default, all the identifiers are considered as source_id

astroquery/esa/euclid/tests/test_euclidtap.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,20 @@ def test_logout(mock_logout):
10911091
assert (mock_logout.call_count == 4)
10921092

10931093

1094+
def test_get_datalinks(monkeypatch):
1095+
def get_datalinks_monkeypatched(self, ids, linking_parameter, verbose):
1096+
return Table()
1097+
1098+
# `GaiaClass` is a subclass of `TapPlus`, but it does not inherit
1099+
# `get_datalinks()`, it replaces it with a call to the `get_datalinks()`
1100+
# of its `__gaiadata`.
1101+
monkeypatch.setattr(TapPlus, "get_datalinks", get_datalinks_monkeypatched)
1102+
euclid = EuclidClass(show_server_messages=False)
1103+
1104+
result = euclid.get_datalinks(ids=[12345678], verbose=True)
1105+
assert isinstance(result, Table)
1106+
1107+
10941108
def test_load_async_job(mock_querier_async):
10951109
jobid = '1479386030738O'
10961110
name = None

0 commit comments

Comments
 (0)