mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-08 01:58:26 -04:00
Merge pull request #1733 from alphagov/remove-dvla
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 (
|
from notifications_utils.template import (
|
||||||
PlainTextEmailTemplate,
|
PlainTextEmailTemplate,
|
||||||
SMSMessageTemplate,
|
SMSMessageTemplate,
|
||||||
LetterDVLATemplate,
|
LetterPrintTemplate,
|
||||||
)
|
)
|
||||||
|
|
||||||
from app.encryption import (
|
from app.encryption import (
|
||||||
@@ -728,9 +728,8 @@ class TemplateBase(db.Model):
|
|||||||
{'content': self.content}
|
{'content': self.content}
|
||||||
)
|
)
|
||||||
if self.template_type == LETTER_TYPE:
|
if self.template_type == LETTER_TYPE:
|
||||||
return LetterDVLATemplate(
|
return LetterPrintTemplate(
|
||||||
{'content': self.content, 'subject': self.subject},
|
{'content': self.content, 'subject': self.subject},
|
||||||
notification_reference=1,
|
|
||||||
contact_block=self.service.get_default_letter_contact(),
|
contact_block=self.service.get_default_letter_contact(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ notifications-python-client==4.7.2
|
|||||||
# PaaS
|
# PaaS
|
||||||
awscli-cwlogs>=1.4,<1.5
|
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
|
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 requests import RequestException
|
||||||
from sqlalchemy.exc import SQLAlchemyError
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
from celery.exceptions import Retry
|
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 import (encryption, DATETIME_FORMAT)
|
||||||
from app.celery import provider_tasks
|
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
|
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):
|
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/",
|
inbound_api = create_service_inbound_api(service=sample_service, url="https://some.service.gov.uk/",
|
||||||
bearer_token="something_unique")
|
bearer_token="something_unique")
|
||||||
|
|||||||
Reference in New Issue
Block a user