mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
add testcase to check multiple datatypes
This commit is contained in:
parent
7fbbfb0ec9
commit
210fecb5e9
|
@ -68,6 +68,8 @@ class TestFieldMapping(TestCase):
|
||||||
{'items': {'enum': ['True', 'False'], 'type': 'string'}, 'type': 'array'}),
|
{'items': {'enum': ['True', 'False'], 'type': 'string'}, 'type': 'array'}),
|
||||||
(serializers.ListField(child=serializers.ChoiceField(choices=[(uuid1, 'uuid1'), (uuid2, 'uuid2')])),
|
(serializers.ListField(child=serializers.ChoiceField(choices=[(uuid1, 'uuid1'), (uuid2, 'uuid2')])),
|
||||||
{'items': {'enum': [uuid1, uuid2]}, 'type': 'array'}),
|
{'items': {'enum': [uuid1, uuid2]}, 'type': 'array'}),
|
||||||
|
(serializers.ListField(child=serializers.ChoiceField(choices=[(1, 'One'), ('a', 'Choice A')])),
|
||||||
|
{'items': {'enum': [1, 'a']}, 'type': 'array'}),
|
||||||
(serializers.IntegerField(min_value=2147483648),
|
(serializers.IntegerField(min_value=2147483648),
|
||||||
{'type': 'integer', 'minimum': 2147483648, 'format': 'int64'}),
|
{'type': 'integer', 'minimum': 2147483648, 'format': 'int64'}),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user