diff --git a/tests/app/conftest.py b/tests/app/conftest.py index e322ae5187..c2ebb23cef 100644 --- a/tests/app/conftest.py +++ b/tests/app/conftest.py @@ -501,21 +501,23 @@ def sample_trial_letter_template(sample_service_full_permissions): @pytest.fixture(scope='function') -def sample_email_template_with_placeholders(notify_db, notify_db_session): - return sample_email_template( - notify_db, - notify_db_session, +def sample_email_template_with_placeholders(sample_service): + return create_template( + sample_service, + template_type=EMAIL_TYPE, + subject="((name))", content="Hello ((name))\nThis is an email from GOV.UK", - subject_line="((name))") + ) @pytest.fixture(scope='function') -def sample_email_template_with_html(notify_db, notify_db_session): - return sample_email_template( - notify_db, - notify_db_session, +def sample_email_template_with_html(sample_service): + return create_template( + sample_service, + template_type=EMAIL_TYPE, + subject="((name)) some HTML", content="Hello ((name))\nThis is an email from GOV.UK with some HTML", - subject_line="((name)) some HTML") + ) @pytest.fixture(scope='function') @@ -665,7 +667,7 @@ def sample_notification_with_job( key_type=KEY_TYPE_NORMAL ): if not service: - service = create_service() + service = create_service(check_if_service_exists=True) if not template: template = create_template(service=service) if job is None: