diff --git a/gwcelery/tests/test_tasks_external_triggers.py b/gwcelery/tests/test_tasks_external_triggers.py index 28a72fc4e99eb150189f47b5356d42f5b64e547f..312c98fcae54bd10ee286be560445e627af802d0 100644 --- a/gwcelery/tests/test_tasks_external_triggers.py +++ b/gwcelery/tests/test_tasks_external_triggers.py @@ -260,12 +260,14 @@ def test_handle_create_skymap_label_from_superevent(mock_create_label, mock_create_label.assert_called_once_with('SKYMAP_READY', 'E1212') -@patch('gwcelery.tasks.gracedb.get_group', return_value='CBC') + @patch('gwcelery.tasks.raven.raven_pipeline') @patch('gwcelery.tasks.gracedb.get_superevent', return_value={ 'superevent_id': 'S1234', - 'preferred_event': 'G1234' + 'preferred_event': 'G1234', + 'preferred_event_data': + {'group': 'CBC'} }) @patch('gwcelery.tasks.gracedb.get_event', return_value={ @@ -332,7 +334,7 @@ def test_handle_label_removed(mock_get_superevent, ) -@patch('gwcelery.tasks.external_skymaps.create_combined_skymap') +@patch('gwcelery.tasks.external_skymaps.create_combined_skymap.run') def test_handle_skymap_combine(mock_create_combined_skymap): alert = {"uid": "E1212", "alert_type": "label_added", @@ -340,8 +342,7 @@ def test_handle_skymap_combine(mock_create_combined_skymap): "object": { "graceid": "E1212", "group": "External", - "labels": ["EM_COINC", "EXT_SKYMAP_READY", "SKYMAP_READY", - "RAVEN_ALERT"], + "labels": ["EM_COINC", "EXT_SKYMAP_READY", "SKYMAP_READY"], "superevent": "S1234"} } external_triggers.handle_grb_igwn_alert(alert)