Add PropertyMock()
@@ -211,13 +211,12 @@ def test_query_object():
# dtype=(str, int, str, float, float),
# units=(None, None, None, u.deg, u.deg))
result = PropertyMock()
- result = {'colnames': ('pl_name', 'disc_year', 'discoverymethod', 'ra', 'dec'),
- 'disc_year': 2015, 'discoverymethod': 'Transit', 'ra': [172.560141] * u.deg, 'dec': [7.5878315] * u.deg}
+ result = {'pl_name': 'K2-18 b', 'disc_year': 2015, 'discoverymethod': 'Transit', 'ra': [172.560141] * u.deg, 'dec': [7.5878315] * u.deg}
return result
nasa_exoplanet_archive.query_object = mock_run_query
response = nasa_exoplanet_archive.query_object()
- assert 'pl_name' in response.colnames
+ assert 'pl_name' == 'K2-18 b'
assert response['disc_year'] == 2015
assert 'Transit' in response['discoverymethod']
assert response['ra'] == [172.560141] * u.deg
