This commit is contained in:
Adam Duren 2017-05-12 15:43:02 +00:00 committed by GitHub
commit 753c8c157b
2 changed files with 6 additions and 2 deletions

View File

@ -124,7 +124,8 @@ class SimpleMetadata(BaseMetadata):
attrs = [ attrs = [
'read_only', 'label', 'help_text', 'read_only', 'label', 'help_text',
'min_length', 'max_length', 'min_length', 'max_length',
'min_value', 'max_value' 'min_value', 'max_value',
'initial',
] ]
for attr in attrs: for attr in attrs:

View File

@ -143,10 +143,12 @@ class TestMetadata:
'required': True, 'required': True,
'read_only': False, 'read_only': False,
'label': 'List field', 'label': 'List field',
'initial': '[]',
'child': { 'child': {
'type': 'list', 'type': 'list',
'required': True, 'required': True,
'read_only': False, 'read_only': False,
'initial': '[]',
'child': { 'child': {
'type': 'integer', 'type': 'integer',
'required': True, 'required': True,
@ -355,7 +357,8 @@ class TestModelSerializerMetadata(TestCase):
'type': 'field', 'type': 'field',
'required': False, 'required': False,
'read_only': True, 'read_only': True,
'label': 'Children' 'label': 'Children',
'initial': '[]',
}, },
'integer_field': { 'integer_field': {
'type': 'integer', 'type': 'integer',