mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Restore dao_create_template and use custom template fixture instead
This commit is contained in:
@@ -26,11 +26,11 @@ from app.dao.provider_details_dao import (
|
||||
)
|
||||
from app.models import Service, Template
|
||||
from app.utils import get_london_midnight_in_utc
|
||||
from tests.app.db import create_notification, create_service, create_template
|
||||
from tests.app.db import create_notification, create_service
|
||||
from tests.app.conftest import (
|
||||
sample_job as create_sample_job,
|
||||
sample_notification_history as create_notification_history,
|
||||
create_notify_template
|
||||
create_custom_template
|
||||
)
|
||||
from tests.conftest import set_config_values
|
||||
from unittest.mock import call, patch, PropertyMock
|
||||
@@ -46,17 +46,12 @@ def _create_slow_delivery_notification(provider='mmg'):
|
||||
)
|
||||
template = Template.query.get(current_app.config['FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID'])
|
||||
if not template:
|
||||
template = create_notify_template(
|
||||
template = create_custom_template(
|
||||
service=service,
|
||||
user=service.users[0],
|
||||
template_config_name='FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID',
|
||||
content='',
|
||||
template_type='sms'
|
||||
)
|
||||
# template = create_template(
|
||||
# template_id=current_app.config.get('FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID'),
|
||||
# service=service
|
||||
# )
|
||||
|
||||
create_notification(
|
||||
template=template,
|
||||
|
||||
Reference in New Issue
Block a user