  from django.test import TestCase
  from rest_framework import serializers
  from rest_framework.tests.models import (HasPositiveIntegerAsChoice, Album, ActionItem, Anchor, BasicModel,
      BlankFieldModel, BlogPost, Book, CallableDefaultValueModel, DefaultValueModel,
      ManyToManyModel, Person, ReadOnlyManyToManyModel, Photo, ParentModel, ChildModel,
      AssociatedModel)
  import datetime
  import pickle
  
  
  class SubComment(object):
 
</s> remove     def test_multitable_inherited_model(self):
        data = {
            'name1': 'parent name',
            'name2': 'child name',
        }
        serializer = DerivedModelSerializer(data=data)
        self.assertEqual(serializer.is_valid(), True)

 </s> add  </s> remove     def test_multitable_inherited_model_fields_as_expected(self):
        """
        Assert that the parent pointer field is not included in the fields
        serialized fields
        """
        child = ChildModel(name1='parent name', name2='child name')
        serializer = DerivedModelSerializer(child)
        self.assertEqual(set(serializer.data.keys()),
                         set(['name1', 'name2', 'id']))

    def test_onetoone_primary_key_model_fields_as_expected(self):
        """
        Assert that a model with a onetoone field that is the primary key is
        not treated like a derived model
        """
        parent = ParentModel(name1='parent name')
        associate = AssociatedModel(name='hello', ref=parent)
        serializer = AssociatedModelSerializer(associate)
        self.assertEqual(set(serializer.data.keys()),
                         set(['name', 'ref']))

 </s> add  </s> remove 

# Inherited
class ParentModel(RESTFrameworkModel):
    name1 = models.CharField(max_length=100)


class ChildModel(ParentModel):
    name2 = models.CharField(max_length=100)


class AssociatedModel(RESTFrameworkModel):
    ref = models.OneToOneField(ParentModel, primary_key=True)
    name = models.CharField(max_length=100)
 </s> add 
    ManyToManyModel, Person, ReadOnlyManyToManyModel, Photo)
from rest_framework.tests.multitable_inheritance import (ParentModel,
    ChildModel, AssociatedModel)
  from django.test import TestCase
  from rest_framework import serializers
  from rest_framework.tests.models import (HasPositiveIntegerAsChoice, Album, ActionItem, Anchor, BasicModel,
      BlankFieldModel, BlogPost, Book, CallableDefaultValueModel, DefaultValueModel,
    ManyToManyModel, Person, ReadOnlyManyToManyModel, Photo)
from rest_framework.tests.multitable_inheritance import (ParentModel,
    ChildModel, AssociatedModel)
    ManyToManyModel, Person, ReadOnlyManyToManyModel, Photo)
from rest_framework.tests.multitable_inheritance import (ParentModel,
    ChildModel, AssociatedModel)
  import datetime
  import pickle
  
  
  class SubComment(object):
keep keep keep keep replace replace keep keep keep keep keep
 Group the model-inheritance-related tests together 
rest_framework/tests/serializer.py