Fix QueryDict type error in test (#8475)

QueryDict takes a `str` argument. Discovered while working on
djangorestframework-stubs.
This commit is contained in:
Marti Raudsepp 2022-06-08 16:37:46 +03:00 committed by GitHub
parent e7af8d662b
commit 26830c3d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1865,9 +1865,9 @@ class TestMultipleChoiceField(FieldValues):
def test_against_partial_and_full_updates(self): def test_against_partial_and_full_updates(self):
field = serializers.MultipleChoiceField(choices=(('a', 'a'), ('b', 'b'))) field = serializers.MultipleChoiceField(choices=(('a', 'a'), ('b', 'b')))
field.partial = False field.partial = False
assert field.get_value(QueryDict({})) == [] assert field.get_value(QueryDict('')) == []
field.partial = True field.partial = True
assert field.get_value(QueryDict({})) == rest_framework.fields.empty assert field.get_value(QueryDict('')) == rest_framework.fields.empty
class TestEmptyMultipleChoiceField(FieldValues): class TestEmptyMultipleChoiceField(FieldValues):