mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Updates as per review comments
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user