'Verify that the serializer produced the expected topics.'

def assert_serializer_output(self, topics, num_teams_per_topic, num_queries):

    with self.assertNumQueries(num_queries):
        page = Paginator(self.course.teams_topics, self.PAGE_SIZE).page(1)
        serializer = self.serializer(instance=page, context={'course_id': self.course.id})
        self.assertEqual(serializer.data['results'], [self._merge_dicts(topic, {u'team_count': num_teams_per_topic}) for topic in topics])
