Skip to content

Commit 3e09113

Browse files
committed
test: fix unit tests
(cherry picked from commit 6428ac4)
1 parent cc77c10 commit 3e09113

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_fields.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,16 +2056,18 @@ class TestMultipleChoiceField(FieldValues):
20562056
Valid and invalid values for `MultipleChoiceField`.
20572057
"""
20582058
valid_inputs = {
2059-
(): set(),
2060-
('aircon',): {'aircon'},
2061-
('aircon', 'manual'): {'aircon', 'manual'},
2059+
(): list(),
2060+
("aircon",): ["aircon"],
2061+
("aircon", "manual"): ["aircon", "manual"],
2062+
("manual", "aircon"): ["manual", "aircon"],
20622063
}
20632064
invalid_inputs = {
20642065
'abc': ['Expected a list of items but got type "str".'],
20652066
('aircon', 'incorrect'): ['"incorrect" is not a valid choice.']
20662067
}
20672068
outputs = [
2068-
(['aircon', 'manual', 'incorrect'], {'aircon', 'manual', 'incorrect'})
2069+
(["aircon", "manual", "incorrect"], ["aircon", "manual", "incorrect"]),
2070+
(["manual", "aircon", "incorrect"], ["manual", "aircon", "incorrect"]),
20692071
]
20702072
field = serializers.MultipleChoiceField(
20712073
choices=[

0 commit comments

Comments
 (0)