mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Alter existing schema test to check for help_text in serializer Meta
This commit is contained in:
parent
0fdaf4f481
commit
0cd0212d9a
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user