  from django.test import TestCase
  from rest_framework import generics, renderers, serializers, status
  from rest_framework.test import APIRequestFactory
  from rest_framework.tests.models import BasicModel, Comment, SlugBasedModel
  from rest_framework.compat import six
  
  factory = APIRequestFactory()
  
 
</s> remove     target = models.ForeignKey(ForeignKeyTarget, related_name='sources')
 </s> add     target = models.ForeignKey(ForeignKeyTarget, related_name='sources',
                               verbose_name='Target object') </s> remove                                related_name='nullable_sources')
 </s> add                                related_name='nullable_sources',
                               verbose_name='Optional target object')
from rest_framework.tests.models import ForeignKeySource, ForeignKeyTarget
  from django.test import TestCase
  from rest_framework import generics, renderers, serializers, status
  from rest_framework.test import APIRequestFactory
  from rest_framework.tests.models import BasicModel, Comment, SlugBasedModel
from rest_framework.tests.models import ForeignKeySource, ForeignKeyTarget
  from rest_framework.compat import six
  
  factory = APIRequestFactory()
  
keep keep keep add keep keep keep keep
 Metadata for related fields -- added test case. 
rest_framework/tests/test_generics.py