              setattr(instance, key, val)
          return instance
  
  
  class LongText(object):
      def __init__(self, content):
          self.content = content
  
      def __eq__(self, other):
          return all([getattr(self, attr) == getattr(other, attr)
                      for attr in ('content',)])
  
  
  class LongTextSerializer(serializers.Serializer):
      content = serializers.TextField()
  
      def restore_object(self, data, instance=None):
          if instance is None:
              return LongText(**data)
          for key, val in data.items():
              setattr(instance, key, val)
          return instance
  
  
  class BasicTests(TestCase):
      def setUp(self):
          self.comment = Comment(
              'tom@example.com',
              'Happy new year!',
 
</s> remove     def test_update_long_text(self):
        data = {
            'content' : 'Lorem ipsum dolor sit amet.'
        }
        serializer = LongTextSerializer(data, self.long_text)
        self.assertEquals(serializer.is_valid(), True)
        self.assertEquals(data['content'], self.long_text.content)

 </s> add  </s> remove class TextField(WritableField):
    type_name = 'TextField'

    def from_native(self, value):
        if isinstance(value, basestring) or value is None:
            return value
        return smart_unicode(value)
 </s> add  </s> remove         self.long_text = LongText('test test test test')
 </s> add 
              setattr(instance, key, val)
          return instance
  
  




















  class BasicTests(TestCase):
      def setUp(self):
          self.comment = Comment(
              'tom@example.com',
              'Happy new year!',
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Removed serializer.TextField and related tests 
rest_framework/tests/serializer.py