mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
update to check for instance of SerialisedService
This commit is contained in:
@@ -196,7 +196,7 @@ def get_html_email_options(service):
|
|||||||
'govuk_banner': True,
|
'govuk_banner': True,
|
||||||
'brand_banner': False,
|
'brand_banner': False,
|
||||||
}
|
}
|
||||||
if isinstance(service.email_branding, str):
|
if isinstance(service, SerialisedService):
|
||||||
branding = dao_get_email_branding_by_id(service.email_branding)
|
branding = dao_get_email_branding_by_id(service.email_branding)
|
||||||
else:
|
else:
|
||||||
branding = service.email_branding
|
branding = service.email_branding
|
||||||
|
|||||||
@@ -756,9 +756,8 @@ def test_send_email_to_provider_should_user_normalised_to(
|
|||||||
notification = create_notification(template=sample_email_template,
|
notification = create_notification(template=sample_email_template,
|
||||||
to_field='TEST@example.com',
|
to_field='TEST@example.com',
|
||||||
normalised_to='test@example.com')
|
normalised_to='test@example.com')
|
||||||
print("************* start")
|
|
||||||
send_to_providers.send_email_to_provider(notification)
|
send_to_providers.send_email_to_provider(notification)
|
||||||
print("End ******************")
|
|
||||||
send_mock.assert_called_once_with(ANY,
|
send_mock.assert_called_once_with(ANY,
|
||||||
notification.normalised_to,
|
notification.normalised_to,
|
||||||
ANY,
|
ANY,
|
||||||
|
|||||||
Reference in New Issue
Block a user