mirror of
https://github.com/GSA/notifications-api.git
synced 2026-04-05 01:49:29 -04:00
Remove anything to do with DVLA format letters
This commit is contained in:
@@ -23,7 +23,7 @@ from notifications_utils.letter_timings import get_letter_timings
|
||||
from notifications_utils.template import (
|
||||
PlainTextEmailTemplate,
|
||||
SMSMessageTemplate,
|
||||
LetterDVLATemplate,
|
||||
LetterPrintTemplate,
|
||||
)
|
||||
|
||||
from app.encryption import (
|
||||
@@ -728,9 +728,8 @@ class TemplateBase(db.Model):
|
||||
{'content': self.content}
|
||||
)
|
||||
if self.template_type == LETTER_TYPE:
|
||||
return LetterDVLATemplate(
|
||||
return LetterPrintTemplate(
|
||||
{'content': self.content, 'subject': self.subject},
|
||||
notification_reference=1,
|
||||
contact_block=self.service.get_default_letter_contact(),
|
||||
)
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ notifications-python-client==4.7.2
|
||||
# PaaS
|
||||
awscli-cwlogs>=1.4,<1.5
|
||||
|
||||
git+https://github.com/alphagov/notifications-utils.git@23.8.0#egg=notifications-utils==23.8.0
|
||||
git+https://github.com/alphagov/notifications-utils.git@24.0.0#egg=notifications-utils==24.0.0
|
||||
|
||||
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3
|
||||
|
||||
@@ -9,7 +9,7 @@ from freezegun import freeze_time
|
||||
from requests import RequestException
|
||||
from sqlalchemy.exc import SQLAlchemyError
|
||||
from celery.exceptions import Retry
|
||||
from notifications_utils.template import SMSMessageTemplate, WithSubjectTemplate, LetterDVLATemplate
|
||||
from notifications_utils.template import SMSMessageTemplate, WithSubjectTemplate
|
||||
|
||||
from app import (encryption, DATETIME_FORMAT)
|
||||
from app.celery import provider_tasks
|
||||
@@ -1209,14 +1209,6 @@ def test_get_template_class(template_type, expected_class):
|
||||
assert get_template_class(template_type) == expected_class
|
||||
|
||||
|
||||
@freeze_time("2017-03-23 11:09:00.061258")
|
||||
def test_dvla_letter_template(sample_letter_notification):
|
||||
t = {"content": sample_letter_notification.template.content,
|
||||
"subject": sample_letter_notification.template.subject}
|
||||
letter = LetterDVLATemplate(t, sample_letter_notification.personalisation, "random-string")
|
||||
assert str(letter) == "140|500|001||random-string|||||||||||||A1||A2|A3|A4|A5|A6|A_POST|||||||||23 March 2017<cr><cr><h1>Template subject<normal><cr><cr>Dear Sir/Madam, Hello. Yours Truly, The Government.<cr><cr>" # noqa
|
||||
|
||||
|
||||
def test_send_inbound_sms_to_service_post_https_request_to_service(notify_api, sample_service):
|
||||
inbound_api = create_service_inbound_api(service=sample_service, url="https://some.service.gov.uk/",
|
||||
bearer_token="something_unique")
|
||||
|
||||
Reference in New Issue
Block a user