Stop email preview showing brand name

This is a leftover from when email brands didn't
have a 'text' field.

It also adds some tests to check the brand name
is displaying correctly.
This commit is contained in:
Tom Byers
2018-08-14 17:20:31 +01:00
parent 8ba8606963
commit 6b0d79ad72
3 changed files with 45 additions and 3 deletions

View File

@@ -2485,6 +2485,25 @@ def mock_get_email_branding(mocker, fake_uuid):
)
@pytest.fixture(scope='function')
def mock_get_email_branding_without_brand_text(mocker, fake_uuid):
def _get_email_branding_without_brand_text(id):
return {
'email_branding': {
'logo': 'example.png',
'name': 'Organisation name',
'text': '',
'id': fake_uuid,
'colour': '#f00'
}
}
return mocker.patch(
'app.email_branding_client.get_email_branding',
side_effect=_get_email_branding_without_brand_text
)
@pytest.fixture(scope='function')
def mock_create_email_branding(mocker):
def _create_email_branding(logo, name, text, colour):