Exemplo n.º 1
0
 def test_args_to_payload_class_2(self, patch_fromname):
     with pytest.raises(Exception) as ex:
         IrsaDust._args_to_payload("m81", radius="5")
     assert ex.value.args[0] == "No unit specified"
Exemplo n.º 2
0
 def test_args_to_payload_class_3(self, radius, patch_fromname):
     errmsg = ("Radius (in any unit) must be in the"
               " range of 2.0 to 37.5 degrees")
     with pytest.raises(ValueError) as ex:
         IrsaDust._args_to_payload("m81", radius=radius)
     assert ex.value.args[0] == errmsg
Exemplo n.º 3
0
 def test_args_to_payload_class_1(self, coordinate, radius,
                                  expected_payload, patch_fromname):
     payload = IrsaDust._args_to_payload(coordinate, radius=radius)
     assert payload == expected_payload