More tweaks, trying to get tests to be clean.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-10 11:18:33 -05:00
parent 908d695b54
commit ac9591ec7c
18 changed files with 37 additions and 29 deletions

View File

@@ -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
):

View File

@@ -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"}