Updates as per review comments

This commit is contained in:
Rebecca Law
2017-11-28 11:05:56 +00:00
parent ab5b7c20a7
commit b0d88ec08c
3 changed files with 18 additions and 7 deletions

View File

@@ -991,7 +991,7 @@ def test_save_sms_does_not_send_duplicate_and_does_not_put_in_retry_queue(sample
def test_save_letter_saves_letter_to_database(mocker, notify_db_session):
service = create_service()
create_letter_contact(service=service, contact_block="Address contract", is_default=True)
create_letter_contact(service=service, contact_block="Address contact", is_default=True)
template = create_template(service=service, template_type=LETTER_TYPE)
job = create_job(template=template)
@@ -1035,7 +1035,7 @@ def test_save_letter_saves_letter_to_database(mocker, notify_db_session):
assert notification_db.sent_by is None
assert notification_db.personalisation == personalisation
assert notification_db.reference == "this-is-random-in-real-life"
assert notification_db.reply_to_text == "Address contract"
assert notification_db.reply_to_text == "Address contact"
def test_should_cancel_job_if_service_is_inactive(sample_service,

View File

@@ -27,9 +27,17 @@ from app.models import (
ProviderRates,
ScheduledNotification,
ServiceWhitelist,
KEY_TYPE_NORMAL, KEY_TYPE_TEST, KEY_TYPE_TEAM,
MOBILE_TYPE, EMAIL_TYPE, INBOUND_SMS_TYPE, SMS_TYPE, LETTER_TYPE, NOTIFICATION_STATUS_TYPES_COMPLETED,
SERVICE_PERMISSION_TYPES, ServiceEmailReplyTo
KEY_TYPE_NORMAL,
KEY_TYPE_TEST,
KEY_TYPE_TEAM,
MOBILE_TYPE,
EMAIL_TYPE,
INBOUND_SMS_TYPE,
SMS_TYPE,
LETTER_TYPE,
NOTIFICATION_STATUS_TYPES_COMPLETED,
SERVICE_PERMISSION_TYPES,
ServiceEmailReplyTo
)
from app.dao.users_dao import (create_user_code, create_secret_code)
from app.dao.services_dao import (dao_create_service, dao_add_user_to_service)