  from __future__ import unicode_literals
  from django.test import TestCase
  from django.test.client import RequestFactory
  from rest_framework import serializers, viewsets
  from rest_framework.compat import include, patterns, url
  from rest_framework.decorators import link, action
 
</s> remove from rest_framework.response import Response
from rest_framework import viewsets
 </s> add from rest_framework import serializers, viewsets
from rest_framework.compat import include, patterns, url </s> remove 
        self.lookup_field = kwargs.pop('lookup_field', self.lookup_field)
 </s> add         lookup_field = kwargs.pop('lookup_field', None)
        if lookup_field is not None:
            self.lookup_field = lookup_field
from django.db import models
  from __future__ import unicode_literals
from django.db import models
  from django.test import TestCase
  from django.test.client import RequestFactory
  from rest_framework import serializers, viewsets
  from rest_framework.compat import include, patterns, url
  from rest_framework.decorators import link, action
add keep keep keep keep keep
 HyperlinkedModelSerializer lookup_field option should apply to HyperlinkedIdentityField 
rest_framework/tests/test_routers.py