          value = data.get(field_name)
          into[(self.source or field_name) + '_id'] = self.from_native(value)
  
  
  class ManyRelatedField(RelatedField):
      """
      Base class for related model managers.
      """
      def field_to_native(self, obj, field_name):
          value = getattr(obj, self.source or field_name)
 
</s> remove     Base class for related model managers.
 </s> add     Mixin to convert a related field to a many related field. </s> remove         request = factory.get('/')
 </s> add         request = factory.get('/basic/')
        response = self.list_view(request).render()
        self.assertEquals(response.status_code, status.HTTP_200_OK)
        self.assertEquals(response.data, self.data)

    def test_get_detail_view(self):
        """
        GET requests to ListCreateAPIView should return list of objects.
        """
        request = factory.get('/basic/1')
        response = self.detail_view(request, pk=1).render()
        self.assertEquals(response.status_code, status.HTTP_200_OK)
        self.assertEquals(response.data, self.data[0])


class TestManyToManyHyperlinkedView(TestCase):
    urls = 'rest_framework.tests.hyperlinkedserializers'

    def setUp(self):
        """
        Create 3 BasicModel intances.
        """
        items = ['foo', 'bar', 'baz']
        anchors = []
        for item in items:
            anchor = Anchor(text=item)
            anchor.save()
            anchors.append(anchor)

        manytomany = ManyToManyModel()
        manytomany.save()
        manytomany.rel.add(*anchors)

        self.data = [{
            'url': 'http://testserver/manytomany/1/',
            'rel': [
                'http://testserver/anchor/1/',
                'http://testserver/anchor/2/',
                'http://testserver/anchor/3/',
            ]
        }]
        self.list_view = ManyToManyList.as_view()
        self.detail_view = ManyToManyDetail.as_view()

    def test_get_list_view(self):
        """
        GET requests to ListCreateAPIView should return list of objects.
        """
        request = factory.get('/manytomany/') </s> remove class TestHyperlinkedView(TestCase):
 </s> add class TestBasicHyperlinkedView(TestCase):
class ManyRelatedMixin(object):
          value = data.get(field_name)
          into[(self.source or field_name) + '_id'] = self.from_native(value)
  
  
class ManyRelatedMixin(object):
      """
      Base class for related model managers.
      """
      def field_to_native(self, obj, field_name):
          value = getattr(obj, self.source or field_name)
keep keep keep keep replace keep keep keep keep keep
 Initial tests for hyperlinked relationships 
rest_framework/fields.py