mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 02:13:12 -04:00
More tweaks, trying to get tests to be clean.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -41,7 +41,7 @@ def test_get_all_templates_returns_200(client, sample_service):
|
||||
assert template["subject"] == templates[index].subject
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tmp_type", list(TemplateType))
|
||||
@pytest.mark.parametrize("tmp_type", TemplateType)
|
||||
def test_get_all_templates_for_valid_type_returns_200(client, sample_service, tmp_type):
|
||||
templates = [
|
||||
create_template(
|
||||
@@ -75,7 +75,7 @@ def test_get_all_templates_for_valid_type_returns_200(client, sample_service, tm
|
||||
assert template["subject"] == templates[index].subject
|
||||
|
||||
|
||||
@pytest.mark.parametrize("tmp_type", list(TemplateType))
|
||||
@pytest.mark.parametrize("tmp_type", TemplateType)
|
||||
def test_get_correct_num_templates_for_valid_type_returns_200(
|
||||
client, sample_service, tmp_type
|
||||
):
|
||||
|
||||
@@ -256,19 +256,19 @@ invalid_json_get_all_response = [
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("template_type", list(TemplateType))
|
||||
@pytest.mark.parametrize("template_type", TemplateType)
|
||||
def test_get_all_template_request_schema_against_no_args_is_valid(template_type):
|
||||
data = {}
|
||||
assert validate(data, get_all_template_request) == data
|
||||
|
||||
|
||||
@pytest.mark.parametrize("template_type", list(TemplateType))
|
||||
@pytest.mark.parametrize("template_type", TemplateType)
|
||||
def test_get_all_template_request_schema_against_valid_args_is_valid(template_type):
|
||||
data = {"type": template_type}
|
||||
assert validate(data, get_all_template_request) == data
|
||||
|
||||
|
||||
@pytest.mark.parametrize("template_type", list(TemplateType))
|
||||
@pytest.mark.parametrize("template_type", TemplateType)
|
||||
def test_get_all_template_request_schema_against_invalid_args_is_invalid(template_type):
|
||||
data = {"type": "unknown"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user