Skip to content
Snippets Groups Projects
Commit 8a4cde6d authored by Sushant Sharma-Chaudhary's avatar Sushant Sharma-Chaudhary Committed by Cody Messick
Browse files

added test coverage for gracedb upload

parent 992f5e59
No related branches found
No related tags found
No related merge requests found
...@@ -143,3 +143,15 @@ def test_high_profile(monkeypatch, superevent, embright, ...@@ -143,3 +143,15 @@ def test_high_profile(monkeypatch, superevent, embright,
) )
elif result is False: elif result is False:
mock_create_label.assert_not_called() mock_create_label.assert_not_called()
mock_gracedb_upload = Mock()
monkeypatch.setattr('gwcelery.tasks.gracedb.upload.run',
mock_create_label)
monkeypatch.setattr('gwcelery.tasks.gracedb.get_event.run',
get_event)
rrt_utils.check_high_profile(skymap, embright,
pastro, superevent)
if result is True:
mock_gracedb_upload.assert_called_once()
elif result is False:
mock_gracedb_upload.assert_not_called()
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