mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-21 14:05:16 +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(
|
field = serializers.ChoiceField(
|
||||||
choices=[
|
choices=[
|
||||||
('Numbers', ['integer', 'float']),
|
('Numbers', ['integer', 'float']),
|
||||||
('Strings', ['text', 'email', 'url'])
|
('Strings', ['text', 'email', 'url']),
|
||||||
|
'boolean'
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
items = list(field.iter_options())
|
items = list(field.iter_options())
|
||||||
|
@ -1132,6 +1133,8 @@ class TestChoiceField(FieldValues):
|
||||||
assert items[7].value == 'url'
|
assert items[7].value == 'url'
|
||||||
assert items[8].end_option_group
|
assert items[8].end_option_group
|
||||||
|
|
||||||
|
assert items[9].value == 'boolean'
|
||||||
|
|
||||||
|
|
||||||
class TestChoiceFieldWithType(FieldValues):
|
class TestChoiceFieldWithType(FieldValues):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user