diff --git a/inspirehep/modules/workflows/tasks/submission.py b/inspirehep/modules/workflows/tasks/submission.py index 4615935fdf..84d65a681c 100644 --- a/inspirehep/modules/workflows/tasks/submission.py +++ b/inspirehep/modules/workflows/tasks/submission.py @@ -200,6 +200,7 @@ def _reply_ticket(obj, eng): return {} if current_app.config.get("FEATURE_FLAG_ENABLE_SNOW"): reply_snow_ticket(obj, ticket_id, context_factory, user, template) + return {} else: if not rt_instance: obj.log.error("No RT instance available. Skipping!") diff --git a/tests/integration/workflows/test_workflow_tasks_submission.py b/tests/integration/workflows/test_workflow_tasks_submission.py index 8496c6fef2..0d83958d3b 100644 --- a/tests/integration/workflows/test_workflow_tasks_submission.py +++ b/tests/integration/workflows/test_workflow_tasks_submission.py @@ -31,8 +31,10 @@ def test_reply_ticket_calls_tickets_reply_when_template_is_not_set(workflow_app) obj = workflow_object_class.create( data=data, extra_data=extra_data, id_user=1, data_type="hep" ) + expected_result = {} _reply_ticket = reply_ticket() - _reply_ticket(obj, None) + result = _reply_ticket(obj, None) + assert expected_result == result assert ( request_mocker.request_history[0]._request.body == '{"ticket_id": "1", "reply_message": "reply reason"}' @@ -61,7 +63,9 @@ def test_reply_ticket_calls_tickets_reply_when_template_is_set(workflow_app): _reply_ticket = reply_ticket( context_factory=reply_ticket_context, template="test.html" ) - _reply_ticket(obj, None) + expected_result = {} + result = _reply_ticket(obj, None) + assert expected_result == result assert ( request_mocker.request_history[0]._request.body == '{"template_context": {"reason": "", "record_url": "", "user_name": "admin@inspirehep.net", "title": "Partial Symmetries of Weak Interactions"}, "ticket_id": "1", "template": "test"}'