Skip to content

Commit 310b1b7

Browse files
committed
Update mock responses in unit tests
1 parent d1dfeb4 commit 310b1b7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

astroquery/irsa_dust/tests/test_irsa_dust.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,10 @@ class MockResponse:
331331
return MockResponse
332332

333333
def get_ext_table_async_mockreturn(self, coordinate, radius=None,
334-
timeout=IrsaDust.TIMEOUT):
335-
return(commons.FileContainer(self.data(EXT_TBL)))
334+
timeout=IrsaDust.TIMEOUT,
335+
show_progress=True):
336+
return(commons.FileContainer(self.data(EXT_TBL),
337+
show_progress=show_progress))
336338

337339
def get_image_list_mockreturn(
338340
self, coordinate, radius=None, image_type=None,
@@ -341,9 +343,11 @@ def get_image_list_mockreturn(
341343

342344
def get_images_async_mockreturn(self, coordinate, radius=None,
343345
image_type=None, timeout=IrsaDust.TIMEOUT,
344-
get_query_payload=False):
346+
get_query_payload=False,
347+
show_progress=True):
345348
readable_obj = commons.FileContainer(self.data(IMG_FITS),
346-
encoding='binary')
349+
encoding='binary',
350+
show_progress=show_progress)
347351
return [readable_obj]
348352

349353
def set_ext_table_text(self, text, xml_tree):

astroquery/ned/tests/test_ned.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def patch_get(request):
4848

4949
@pytest.fixture
5050
def patch_get_readable_fileobj(request):
51-
def get_readable_fileobj_mockreturn(filename, cache=True, encoding=None):
51+
def get_readable_fileobj_mockreturn(filename, cache=True, encoding=None,
52+
show_progress=True):
5253
# Need to read FITS files with binary encoding: should raise error
5354
# otherwise
5455
assert encoding == 'binary'

0 commit comments

Comments
 (0)