mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Update test_serializer.py
This commit is contained in:
parent
e050c8fffe
commit
840bc630f4
|
@ -355,7 +355,7 @@ class BasicTests(TestCase):
|
|||
exclusions = serializer.get_validation_exclusions()
|
||||
self.assertTrue('title' in exclusions, '`title` field was marked `required=False` and should be excluded')
|
||||
|
||||
def test_partial_update(self):
|
||||
def test_a_partial_update(self):
|
||||
serializer = PartialUpdateSerializer(data={'text': 'blah', 'extra': 'blah blah', 'textra': 'blargh',
|
||||
'text_extra': 'blarghal'})
|
||||
if serializer.is_valid():
|
||||
|
@ -364,6 +364,7 @@ class BasicTests(TestCase):
|
|||
second_serializer = PartialUpdateSerializer(entry, data={'textra': 'something different'}, partial=True)
|
||||
self.assertEquals(True, second_serializer.is_valid())
|
||||
|
||||
|
||||
class DictStyleSerializer(serializers.Serializer):
|
||||
"""
|
||||
Note that we don't have any `restore_object` method, so the default
|
||||
|
|
Loading…
Reference in New Issue
Block a user