update to check for instance of SerialisedService

This commit is contained in:
Rebecca Law
2021-02-18 12:54:22 +00:00
parent 88036befcf
commit b464894325
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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,