mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Update all dates to use utc, only in the template is it converted to british time.
Template versions and template version pages added. Fix merge changes.
This commit is contained in:
committed by
Chris Hill-Scott
parent
daf33b03ad
commit
64e7a7b010
@@ -9,6 +9,7 @@ from . import (
|
||||
service_json,
|
||||
TestClient,
|
||||
template_json,
|
||||
template_version_json,
|
||||
api_key_json,
|
||||
job_json,
|
||||
notification_json,
|
||||
@@ -208,7 +209,47 @@ def mock_get_service_template(mocker):
|
||||
return {'data': template}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template', side_effect=_get)
|
||||
'app.service_api_client.get_service_template',
|
||||
side_effect=_get
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_template_version(mocker, fake_uuid, user=None):
|
||||
if user is None:
|
||||
user = api_user_active(fake_uuid)
|
||||
|
||||
def _get(service_id, template_id, version):
|
||||
template_version = template_version_json(
|
||||
service_id,
|
||||
template_id,
|
||||
user,
|
||||
version=version
|
||||
)
|
||||
return {'data': template_version}
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template',
|
||||
side_effect=_get
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_template_versions(mocker, fake_uuid, user=None):
|
||||
if user is None:
|
||||
user = api_user_active(fake_uuid)
|
||||
|
||||
def _get(service_id, template_id):
|
||||
template_version = template_version_json(
|
||||
service_id,
|
||||
template_id,
|
||||
user,
|
||||
version=1
|
||||
)
|
||||
return {'data': [template_version]}
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template_versions',
|
||||
side_effect=_get
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
@@ -220,7 +261,9 @@ def mock_get_service_template_with_placeholders(mocker):
|
||||
return {'data': template}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template', side_effect=_get)
|
||||
'app.service_api_client.get_service_template',
|
||||
side_effect=_get
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
|
||||
Reference in New Issue
Block a user