mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-16 19:41:06 +03:00
Test more types of behavior in test_iter_options
This commit is contained in:
parent
24dec32e7a
commit
33d6d4a420
|
@ -1114,7 +1114,8 @@ class TestChoiceField(FieldValues):
|
|||
field = serializers.ChoiceField(
|
||||
choices=[
|
||||
('Numbers', ['integer', 'float']),
|
||||
('Strings', ['text', 'email', 'url'])
|
||||
('Strings', ['text', 'email', 'url']),
|
||||
'boolean'
|
||||
]
|
||||
)
|
||||
items = list(field.iter_options())
|
||||
|
@ -1132,6 +1133,8 @@ class TestChoiceField(FieldValues):
|
|||
assert items[7].value == 'url'
|
||||
assert items[8].end_option_group
|
||||
|
||||
assert items[9].value == 'boolean'
|
||||
|
||||
|
||||
class TestChoiceFieldWithType(FieldValues):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user