Fix the tests broken by the changes

This commit is contained in:
Tom Byers
2018-08-10 16:57:13 +01:00
parent fafe03e9f0
commit dcb9973f76
3 changed files with 28 additions and 16 deletions

View File

@@ -26,10 +26,11 @@ def test_get_letter_email_branding(mocker):
def test_create_email_branding(mocker):
org_data = {'logo': 'test.png', 'name': 'test name', 'colour': 'red'}
org_data = {'logo': 'test.png', 'name': 'test name', 'text': 'test name', 'colour': 'red'}
mock_post = mocker.patch('app.notify_client.email_branding_client.EmailBrandingClient.post')
EmailBrandingClient().create_email_branding(logo=org_data['logo'], name=org_data['name'], colour=org_data['colour'])
EmailBrandingClient().create_email_branding(
logo=org_data['logo'], name=org_data['name'], text=org_data['text'], colour=org_data['colour'])
mock_post.assert_called_once_with(
url='/email-branding',
@@ -38,11 +39,12 @@ def test_create_email_branding(mocker):
def test_update_email_branding(mocker, fake_uuid):
org_data = {'logo': 'test.png', 'name': 'test name', 'colour': 'red'}
org_data = {'logo': 'test.png', 'name': 'test name', 'text': 'test name', 'colour': 'red'}
mock_post = mocker.patch('app.notify_client.email_branding_client.EmailBrandingClient.post')
EmailBrandingClient().update_email_branding(
branding_id=fake_uuid, logo=org_data['logo'], name=org_data['name'], colour=org_data['colour'])
branding_id=fake_uuid, logo=org_data['logo'], name=org_data['name'], text=org_data['text'],
colour=org_data['colour'])
mock_post.assert_called_once_with(
url='/email-branding/{}'.format(fake_uuid),