mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 17:31:34 -05:00
Refactored get template test
This commit is contained in:
@@ -4,15 +4,14 @@ import uuid
|
||||
from flask import json
|
||||
|
||||
from app import DATETIME_FORMAT
|
||||
from app.models import EMAIL_TYPE, SMS_TYPE, LETTER_TYPE
|
||||
from app.models import EMAIL_TYPE, SMS_TYPE, LETTER_TYPE, TEMPLATE_TYPES
|
||||
from tests import create_authorization_header
|
||||
from tests.app.db import create_template
|
||||
|
||||
template_types = [EMAIL_TYPE, SMS_TYPE, LETTER_TYPE]
|
||||
valid_version_params = [None, 1]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tmp_type", template_types)
|
||||
@pytest.mark.parametrize("tmp_type", TEMPLATE_TYPES)
|
||||
@pytest.mark.parametrize("version", valid_version_params)
|
||||
def test_get_email_template_by_id_returns_200(client, sample_service, tmp_type, version):
|
||||
template = create_template(sample_service, template_type=tmp_type)
|
||||
@@ -66,7 +65,7 @@ def test_get_template_with_non_existent_template_id_returns_404(client, sample_s
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tmp_type", template_types)
|
||||
@pytest.mark.parametrize("tmp_type", TEMPLATE_TYPES)
|
||||
def test_get_template_with_non_existent_version_returns_404(client, sample_service, tmp_type):
|
||||
template = create_template(sample_service, template_type=tmp_type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user