mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 04:07:39 +03:00
Change serializer name for removing confusion
This commit is contained in:
parent
e8167f96e6
commit
f5fc6937ec
|
@ -509,11 +509,11 @@ class ValidationTests(TestCase):
|
||||||
self.assertEqual(serializer.is_valid(), True)
|
self.assertEqual(serializer.is_valid(), True)
|
||||||
|
|
||||||
def test_writable_star_source_on_nested_serializer_with_parent_object(self):
|
def test_writable_star_source_on_nested_serializer_with_parent_object(self):
|
||||||
class Serializer(serializers.Serializer):
|
class TitleSerializer(serializers.Serializer):
|
||||||
title = serializers.WritableField(source='title')
|
title = serializers.WritableField(source='title')
|
||||||
|
|
||||||
class AlbumSerializer(serializers.ModelSerializer):
|
class AlbumSerializer(serializers.ModelSerializer):
|
||||||
nested = Serializer(source='*')
|
nested = TitleSerializer(source='*')
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Album
|
model = Album
|
||||||
|
|
Loading…
Reference in New Issue
Block a user