Apply sender to template when adding

If you’ve come from a template to add a new letter sender then it’s
because you want those words on that template. This commit adds the
extra API call to make that happen.
This commit is contained in:
Chris Hill-Scott
2019-07-08 11:20:28 +01:00
parent 90f56353ab
commit 7fef51aa6a
3 changed files with 23 additions and 4 deletions

View File

@@ -270,7 +270,14 @@ def get_non_default_letter_contact_block(mocker):
@pytest.fixture(scope='function')
def mock_add_letter_contact(mocker):
def _add_letter_contact(service_id, contact_block, is_default=False):
return
return {'data': {
'id': '1234',
'service_id': service_id,
'contact_block': '1 Example Street',
'is_default': True,
'created_at': str(datetime.utcnow()),
'updated_at': None
}}
return mocker.patch('app.service_api_client.add_letter_contact', side_effect=_add_letter_contact)