  import inspect
  import warnings
  
  from django.core import validators
  from django.core.exceptions import ValidationError
  from django.conf import settings
  from django.utils.encoding import is_protected_type, smart_unicode
  from django.utils.translation import ugettext_lazy as _
  from rest_framework.reverse import reverse
  from rest_framework.compat import parse_date, parse_datetime
 
</s> remove from rest_framework.tests.models import BasicModel
 </s> add from rest_framework.tests.models import Anchor, BasicModel, ManyToManyModel </s> remove         request = factory.get('/1')
 </s> add         request = factory.get('/manytomany/1/') </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):
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.urlresolvers import resolve
  import inspect
  import warnings
  
  from django.core import validators
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.urlresolvers import resolve
  from django.conf import settings
  from django.utils.encoding import is_protected_type, smart_unicode
  from django.utils.translation import ugettext_lazy as _
  from rest_framework.reverse import reverse
  from rest_framework.compat import parse_date, parse_datetime
keep keep keep keep replace keep keep keep keep keep
 Initial tests for hyperlinked relationships 
rest_framework/fields.py