From 210fecb5e98623031ab35eae565f1bc40c025493 Mon Sep 17 00:00:00 2001 From: Dhaval Mehta Date: Sat, 25 Jan 2020 11:22:29 +0530 Subject: [PATCH] add testcase to check multiple datatypes --- tests/schemas/test_openapi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/schemas/test_openapi.py b/tests/schemas/test_openapi.py index 4ab76a649..73f60e3c8 100644 --- a/tests/schemas/test_openapi.py +++ b/tests/schemas/test_openapi.py @@ -68,6 +68,8 @@ class TestFieldMapping(TestCase): {'items': {'enum': ['True', 'False'], 'type': 'string'}, 'type': 'array'}), (serializers.ListField(child=serializers.ChoiceField(choices=[(uuid1, 'uuid1'), (uuid2, 'uuid2')])), {'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), {'type': 'integer', 'minimum': 2147483648, 'format': 'int64'}), ]