Ensure that when an API call is made on

- a TEST key
- a research-mode service

We put the task into the research-mode queue NOT the production delivery queue.
This commit is contained in:
Martyn Inglis
2016-09-28 15:48:12 +01:00
parent 3618a3967c
commit b9f0659eaa
3 changed files with 113 additions and 7 deletions

View File

@@ -517,7 +517,9 @@ def test_should_not_send_email_if_restricted_service_and_invalid_email_address(n
Notification.query.filter_by(id=notification_id).one()
def test_should_put_send_email_task_in_research_mode_queue_if_research_mode_service(notify_db, notify_db_session, mocker):
def test_should_put_send_email_task_in_research_mode_queue_if_research_mode_service(
notify_db, notify_db_session, mocker
):
service = sample_service(notify_db, notify_db_session)
service.research_mode = True
services_dao.dao_update_service(service)
@@ -543,7 +545,6 @@ def test_should_put_send_email_task_in_research_mode_queue_if_research_mode_serv
)
def test_should_send_sms_template_to_and_persist_with_job_id(sample_job, sample_api_key, mocker):
notification = _notification_json(
sample_job.template,