Skip to content

Commit

Permalink
Additional testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed May 16, 2024
1 parent 06112e5 commit 3685aea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_plumbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,12 @@ def test_choicefield_choices_enum():
assert schema['enum'] == ['bluepill', 'redpill', '', None]
assert 'type' not in schema

schema = build_choice_field(serializers.ChoiceField(
choices=[1, 2], allow_blank=True
))
assert schema['enum'] == [1, 2, '']
assert 'type' not in schema


def test_choicefield_empty_choices():
schema = build_choice_field(serializers.ChoiceField(choices=[]))
Expand Down

0 comments on commit 3685aea

Please sign in to comment.