          self.assertRaises(serializers.ValidationError, field.from_native, '')
          self.assertRaises(serializers.ValidationError, field.from_native, [])
  
  
  class TestManyRelateMixin(TestCase):
      def test_missing_many_to_many_related_field(self):
          '''
          Regression test for #632
  
          https://github.com/tomchristie/django-rest-framework/pull/632
 
</s> remove     def test_queryset_nested_traversal(self):
        """
        Relational fields should be able to use methods as their source.
        """
        BlogPost.objects.create(title='blah')

        class QuerysetMethodSerializer(serializers.Serializer):
            blogposts = serializers.RelatedField(many=True, source='get_all_blogposts')

        class ClassWithQuerysetMethod(object):
            def get_all_blogposts(self):
                return BlogPost.objects

        obj = ClassWithQuerysetMethod()
        serializer = QuerysetMethodSerializer(obj)
        self.assertEqual(serializer.data, {'blogposts': ['BlogPost object']})

 </s> add  </s> remove from rest_framework.tests.models import ManyToManyTarget, ManyToManySource, ForeignKeyTarget, ForeignKeySource, NullableForeignKeySource, OneToOneTarget, NullableOneToOneSource
 </s> add from rest_framework.tests.models import (
    BlogPost, ManyToManyTarget, ManyToManySource, ForeignKeyTarget, ForeignKeySource,
    NullableForeignKeySource, OneToOneTarget, NullableOneToOneSource,
)
class TestManyRelatedMixin(TestCase):
          self.assertRaises(serializers.ValidationError, field.from_native, '')
          self.assertRaises(serializers.ValidationError, field.from_native, [])
  
  
class TestManyRelatedMixin(TestCase):
      def test_missing_many_to_many_related_field(self):
          '''
          Regression test for #632
  
          https://github.com/tomchristie/django-rest-framework/pull/632
keep keep keep keep replace keep keep keep keep keep
 add tests for related field source for RelatedField and PrimaryKeyRelatedField. #694 
rest_framework/tests/relations.py