From 0cd0212d9aa0274b775f4bb72afadc29edd5163c Mon Sep 17 00:00:00 2001 From: Conor McGee Date: Fri, 24 Mar 2017 17:29:19 +0000 Subject: [PATCH] Alter existing schema test to check for help_text in serializer Meta --- tests/test_schemas.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_schemas.py b/tests/test_schemas.py index f75370170..47bfedd1b 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -38,6 +38,9 @@ class ExampleSerializer(serializers.Serializer): read_only = serializers.CharField(read_only=True) hidden = serializers.HiddenField(default='hello') + class Meta: + extra_kwargs = {'b': {'help_text': 'Another field description'}} + class AnotherSerializer(serializers.Serializer): c = serializers.CharField(required=True) @@ -152,7 +155,7 @@ class TestRouterGeneratedSchema(TestCase): encoding='application/json', fields=[ coreapi.Field('a', required=True, location='form', schema=coreschema.String(title='A', description='A field description')), - coreapi.Field('b', required=False, location='form', schema=coreschema.String(title='B')) + coreapi.Field('b', required=False, location='form', schema=coreschema.String(title='B', description='Another field description')) ] ), 'read': coreapi.Link(