mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-26 08:20:46 +03:00
Test case upgrade to use partial data
This commit is contained in:
parent
989c08109b
commit
94e2d3ca61
|
@ -1018,10 +1018,13 @@ class TestMultipleChoiceField(FieldValues):
|
|||
]
|
||||
)
|
||||
|
||||
def test_against_partial_updates(self):
|
||||
def test_against_partial_and_full_updates(self):
|
||||
# serializer = self.Serializer(data=MockHTMLDict())
|
||||
from django.http import QueryDict
|
||||
field = serializers.MultipleChoiceField(choices=(('a', 'a'), ('b', 'b')))
|
||||
field.partial = False
|
||||
assert field.get_value(QueryDict({})) == []
|
||||
field.partial = True
|
||||
assert field.get_value(QueryDict({})) == rest_framework.fields.empty
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user