|
9 | 9 | @pytest.mark.remote_data
|
10 | 10 | class TestMPC:
|
11 | 11 |
|
12 |
| - @pytest.mark.parametrize('type, name', [ |
| 12 | + @pytest.mark.parametrize('target_type, name', [ |
13 | 13 | ('asteroid', 'ceres'),
|
14 | 14 | ('asteroid', 'eros'),
|
15 |
| - ('asteroid', 'vesta')]) |
16 |
| - def test_query_object_valid_object_by_name(self, type, name): |
17 |
| - response = mpc.MPC.query_object_async(target_type=type, name=name) |
| 15 | + ('asteroid', 'vesta'), |
| 16 | + ('asteroid', 'pallas'), |
| 17 | + ('asteroid', 'piszkesteto')]) |
| 18 | + def test_query_object_valid_object_by_name(self, target_type, name): |
| 19 | + # Keep all 3 of the objects in the tests, too that used to cause issue |
| 20 | + # https://github.com/astropy/astroquery/issues/2531 |
| 21 | + response = mpc.MPC.query_object_async(target_type=target_type, name=name) |
18 | 22 | assert response.status_code == requests.codes.ok
|
19 | 23 | assert len(response.json()) == 1
|
20 | 24 | assert response.json()[0]['name'].lower() == name
|
21 | 25 |
|
22 |
| - @pytest.mark.parametrize('type, number', [ |
| 26 | + @pytest.mark.parametrize('target_type, number', [ |
23 | 27 | ('comet', '103P')])
|
24 |
| - def test_query_object_valid_object_by_number(self, type, number): |
25 |
| - response = mpc.MPC.query_object_async( |
26 |
| - target_type=type, number=number) |
| 28 | + def test_query_object_valid_object_by_number(self, target_type, number): |
| 29 | + response = mpc.MPC.query_object_async(target_type=target_type, number=number) |
27 | 30 | assert response.status_code == requests.codes.ok
|
28 | 31 | assert len(response.json()) == 1
|
29 | 32 | assert str(response.json()[0]['number']) + \
|
30 | 33 | response.json()[0]['object_type'] == number
|
31 | 34 |
|
32 |
| - @pytest.mark.parametrize('type, designation', [ |
| 35 | + @pytest.mark.parametrize('target_type, designation', [ |
33 | 36 | ('comet', 'C/2012 S1')])
|
34 |
| - def test_query_object_valid_object_by_designation(self, type, designation): |
35 |
| - response = mpc.MPC.query_object_async( |
36 |
| - target_type=type, designation=designation) |
| 37 | + def test_query_object_valid_object_by_designation(self, target_type, designation): |
| 38 | + response = mpc.MPC.query_object_async(target_type=target_type, designation=designation) |
37 | 39 | assert response.status_code == requests.codes.ok
|
38 | 40 | assert len(response.json()) == 1
|
39 | 41 | assert response.json()[0]['designation'].lower() == designation.lower()
|
|
0 commit comments