Skip to content
Snippets Groups Projects
Commit 66e638d5 authored by Deep Chatterjee's avatar Deep Chatterjee
Browse files

fix tests

parent 47930400
No related branches found
No related tags found
No related merge requests found
......@@ -312,6 +312,8 @@ def _mock_event(event):
@patch('gwcelery.tasks.gracedb.get_superevent',
lambda _: _mock_superevent_data)
@patch('gwcelery.tasks.gracedb.get_superevents',
lambda _: [_mock_superevent_data])
def test_upload_same_event():
"""New event uploaded with the same coinc file as an
existing event G000002. The second upload should be added to
......@@ -749,10 +751,13 @@ def test_S190421ar_spiir_scenario(): # noqa: N802
with superevent_response, \
patch('gwcelery.tasks.gracedb.add_event_to_superevent') as p1, \
patch('gwcelery.tasks.gracedb.update_superevent') as p2:
patch('gwcelery.tasks.gracedb.update_superevent') as p2, \
patch('gwcelery.tasks.gracedb.get_superevents',
return_value=SUPEREVENTS_NEIGHBOURS.values()) as p3:
superevents.handle(payload)
p1.assert_called_once()
p2.assert_not_called()
p3.assert_called_once()
def test_inj_means_should_not_publish():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment