  from __future__ import unicode_literals
  from django.test import TestCase
  from django.test.client import RequestFactory
  from rest_framework.response import Response
  from rest_framework import viewsets
  from rest_framework.decorators import link, action
  from rest_framework.routers import SimpleRouter
  
  factory = RequestFactory()
  
 
</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 rest_framework import serializers, viewsets
from rest_framework.compat import include, patterns, url
  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 import serializers, viewsets
from rest_framework.compat import include, patterns, url
  from rest_framework.decorators import link, action
  from rest_framework.routers import SimpleRouter
  
  factory = RequestFactory()
  
keep keep keep replace replace keep keep keep keep keep
 HyperlinkedModelSerializer lookup_field option should apply to HyperlinkedIdentityField 
rest_framework/tests/test_routers.py