Skip to content

Commit 92ed446

Browse files
rickynilssonbsipocz
authored andcommitted
Add PropertyMock()
1 parent 9e7d1d0 commit 92ed446

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

astroquery/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,12 @@ def mock_run_query(object_name="K2-18 b", table="pscomppars", select="pl_name,di
211211
# dtype=(str, int, str, float, float),
212212
# units=(None, None, None, u.deg, u.deg))
213213
result = PropertyMock()
214-
result = {'colnames': ('pl_name', 'disc_year', 'discoverymethod', 'ra', 'dec'),
215-
'disc_year': 2015, 'discoverymethod': 'Transit', 'ra': [172.560141] * u.deg, 'dec': [7.5878315] * u.deg}
214+
result = {'pl_name': 'K2-18 b', 'disc_year': 2015, 'discoverymethod': 'Transit', 'ra': [172.560141] * u.deg, 'dec': [7.5878315] * u.deg}
216215

217216
return result
218217
nasa_exoplanet_archive.query_object = mock_run_query
219218
response = nasa_exoplanet_archive.query_object()
220-
assert 'pl_name' in response.colnames
219+
assert 'pl_name' == 'K2-18 b'
221220
assert response['disc_year'] == 2015
222221
assert 'Transit' in response['discoverymethod']
223222
assert response['ra'] == [172.560141] * u.deg

0 commit comments

Comments
 (0)