mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Allow get template fixture to accept version
The other template fixtures do, because the real API call does, it was omitted from the letter equivalent.
This commit is contained in:
@@ -374,7 +374,7 @@ def mock_get_service_email_template_without_placeholders(mocker):
|
|||||||
|
|
||||||
@pytest.fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
def mock_get_service_letter_template(mocker, content=None, subject=None):
|
def mock_get_service_letter_template(mocker, content=None, subject=None):
|
||||||
def _create(service_id, template_id):
|
def _get(service_id, template_id, version=None):
|
||||||
template = template_json(
|
template = template_json(
|
||||||
service_id,
|
service_id,
|
||||||
template_id,
|
template_id,
|
||||||
@@ -386,7 +386,8 @@ def mock_get_service_letter_template(mocker, content=None, subject=None):
|
|||||||
return {'data': template}
|
return {'data': template}
|
||||||
|
|
||||||
return mocker.patch(
|
return mocker.patch(
|
||||||
'app.service_api_client.get_service_template', side_effect=_create)
|
'app.service_api_client.get_service_template', side_effect=_get
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope='function')
|
@pytest.fixture(scope='function')
|
||||||
|
|||||||
Reference in New Issue
Block a user