From 7558a7661a9d6a158ec7dabf4287f4b8beb16132 Mon Sep 17 00:00:00 2001 From: Ken Tsang Date: Tue, 14 Mar 2017 17:53:49 +0000 Subject: [PATCH] Updated schema description --- app/v2/template/template_schemas.py | 2 +- tests/app/v2/template/test_template_schemas.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/v2/template/template_schemas.py b/app/v2/template/template_schemas.py index 2a740e6cf..8356dbd0e 100644 --- a/app/v2/template/template_schemas.py +++ b/app/v2/template/template_schemas.py @@ -4,7 +4,7 @@ from app.schema_validation.definitions import uuid get_template_by_id_request = { "$schema": "http://json-schema.org/draft-04/schema#", - "description": "schema for query parameters allowed when getting list of notifications", + "description": "schema for parameters allowed when getting template by id", "type": "object", "properties": { "id": uuid, diff --git a/tests/app/v2/template/test_template_schemas.py b/tests/app/v2/template/test_template_schemas.py index fa747b05b..9e946c2e2 100644 --- a/tests/app/v2/template/test_template_schemas.py +++ b/tests/app/v2/template/test_template_schemas.py @@ -40,13 +40,12 @@ invalid_request_args = [ ({"id": str(uuid.uuid4()), "version": 0}, ["version 0 is less than the minimum of 1"]), ({"version": 1}, ["id is a required property"]), ({"id": "invalid_uuid"}, ["id is not a valid UUID"]), - ({"id": "invalid_uuid", "version": 0}, ["version 0 is less than the minimum of 1", - "id is not a valid UUID"]) + ({"id": "invalid_uuid", "version": 0}, ["version 0 is less than the minimum of 1", "id is not a valid UUID"]) ] @pytest.mark.parametrize("args", valid_request_args) -def test_get_template_request_schema__against_valid_args_is_valid(args): +def test_get_template_request_schema_against_valid_args_is_valid(args): assert validate(args, get_template_by_id_request) == args