  
          class ExtendedBlogPostSerializer(self.serializer_class):
              first_comment = self.comment_serializer_class(source='get_first_comment')
  
          serializer = ExtendedBlogPostSerializer(post)
          expected = {
              'title': 'Test blog post',
              'comments': [
                  {'text': 'I love this blog post'}
              ],
 
</s> remove         class ExtendedBlogPostSerializer(self.serializer_class):
            first_comment = self.comment_serializer_class(source='get_first_comment')
 </s> add         class BlogPostCommentSerializer(serializers.Serializer):
            text = serializers.CharField()

        class BlogPostSerializer(serializers.Serializer):
            title = serializers.CharField()
            first_comment = BlogPostCommentSerializer(source='get_first_comment')

        serializer = BlogPostSerializer(post) </s> remove             'comments': [
                {'text': 'I love this blog post'}
            ],
 </s> add  </s> remove         self.comment_serializer_class = BlogPostCommentSerializer
        self.serializer_class = BlogPostSerializer

    def test_reverse_relations(self):
        post = BlogPost.objects.create(title="Test blog post")
        post.blogpostcomment_set.create(text="I hate this blog post")
        post.blogpostcomment_set.create(text="I love this blog post")

        serializer = self.serializer_class(instance=post)
 </s> add         serializer = BlogPostSerializer(instance=post) </s> remove     def setUp(self):
 </s> add     def test_reverse_relations(self):
        post = BlogPost.objects.create(title="Test blog post")
        post.blogpostcomment_set.create(text="I hate this blog post")
        post.blogpostcomment_set.create(text="I love this blog post")
  
          class ExtendedBlogPostSerializer(self.serializer_class):
              first_comment = self.comment_serializer_class(source='get_first_comment')
  

          expected = {
              'title': 'Test blog post',
              'comments': [
                  {'text': 'I love this blog post'}
              ],
keep keep keep keep replace keep keep keep keep keep
 Clean up and clarify tests for related serializers 
rest_framework/tests/serializer.py