Add create_letter_branding method to letter branding client

This commit is contained in:
Katie Smith
2019-01-31 16:56:00 +00:00
parent b68d0722bb
commit 446b9ccbb2
2 changed files with 22 additions and 0 deletions

View File

@@ -7,3 +7,17 @@ def test_get_letter_branding(mocker):
mock_get.assert_called_once_with(
url='/dvla_organisations'
)
def test_create_letter_branding(mocker):
new_branding = {'filename': 'uuid-test', 'name': 'my letters', 'domain': 'example.com'}
mock_post = mocker.patch('app.notify_client.letter_branding_client.LetterBrandingClient.post')
LetterBrandingClient().create_letter_branding(
filename=new_branding['filename'], name=new_branding['name'], domain=new_branding['domain']
)
mock_post.assert_called_once_with(
url='/letter-branding',
data=new_branding
)