      artist = serializers.CharField(max_length=100)
      tracks = TrackSerializer(many=True)
  
  
  class NestedSerializerTestCase(TestCase):
      def test_nested_validation_success(self):
          """
          Correct nested serialization should return the input data.
          """
  
 
</s> remove         self.assertEqual(serializer.data, data)
 </s> add         self.assertEqual(serializer.object, data) </s> remove class AlbumSerializer(serializers.Serializer):
    album_name = serializers.CharField(max_length=100)
    artist = serializers.CharField(max_length=100)
    tracks = TrackSerializer(many=True)
 </s> add         class AlbumSerializer(serializers.Serializer):
            album_name = serializers.CharField(max_length=100)
            artist = serializers.CharField(max_length=100)
            tracks = TrackSerializer(many=True) </s> remove class TrackSerializer(serializers.Serializer):
    order = serializers.IntegerField()
    title = serializers.CharField(max_length=100)
    duration = serializers.IntegerField()
 </s> add class WritableNestedSerializerBasicTests(TestCase):
    """
    Tests for deserializing nested entities.
    Basic tests that use serializers that simply restore to dicts.
    """
      artist = serializers.CharField(max_length=100)
      tracks = TrackSerializer(many=True)
  
  

      def test_nested_validation_success(self):
          """
          Correct nested serialization should return the input data.
          """
  
keep keep keep keep replace keep keep keep keep keep
 Extra tests for nested serializers 
rest_framework/tests/serializer_nested.py