  from django.test import TestCase
  from rest_framework import serializers
  from rest_framework.compat import patterns, url
  from rest_framework.tests.models import NullableForeignKeySource, ForeignKeyTarget
  
  def dummy_view(request, pk):
      pass
  
 
</s> remove def dummy_view(request, pk):
    pass
 </s> add  </s> remove 
# Nullable ForeignKey
class SluggedNullableForeignKeySourceSerializer(serializers.ModelSerializer):
    target = serializers.SlugRelatedField(slug_field='name')
    class Meta:
        model = NullableForeignKeySource

class NullOKSluggedNullableForeignKeySourceSerializer(serializers.ModelSerializer):
 </s> add class NullableSlugSourceSerializer(serializers.ModelSerializer): </s> remove         #BUG: All serializers fail here
        serializer = DefaultSluggedNullableForeignKeySourceSerializer(queryset)
        self.assertEquals(serializer.data, default_expected)
        serializer = NullOKSluggedNullableForeignKeySourceSerializer(queryset)
        self.assertEquals(serializer.data, expected)
        serializer = NotRequiredSluggedNullableForeignKeySourceSerializer(queryset)
 </s> add  </s> remove             {'name': u'source-1', 'target': 'target-1'},
            {'name': u'source-2', 'target': 'target-1'},
            {'name': u'source-3', 'target': None},
            {'name': u'source-4', 'target': None}
 </s> add             {'id': 1, 'name': u'source-1', 'target': 'target-1'},
            {'id': 2, 'name': u'source-2', 'target': 'target-1'},
            {'id': 3, 'name': u'source-3', 'target': None},
            {'id': 4, 'name': u'source-4', 'target': None} </s> remove         #BUG: serializer.errors = {'target': [u'Value may not be null']}
        #BUG: Serializer does not use default value to save object
 </s> add 
  from django.test import TestCase
  from rest_framework import serializers

  from rest_framework.tests.models import NullableForeignKeySource, ForeignKeyTarget
  
  def dummy_view(request, pk):
      pass
  
keep keep replace keep keep keep keep keep
 Drop bits of relations_slug tests which don't mirror existing tests. 
rest_framework/tests/relations_slug.py