'Verifies that the `TopicSerializer` correctly displays a topic with a
positive team count, and that it only takes one SQL query.'

def test_topic_with_team_count(self):

    CourseTeamFactory.create(course_id=self.course.id, topic_id=self.course.teams_topics[0]['id'])
    with self.assertNumQueries(1):
        serializer = TopicSerializer(self.course.teams_topics[0], context={'course_id': self.course.id})
        self.assertEqual(serializer.data, {u'name': u'T\xf8pic', u'description': u'The    b\xe9st    topic!', u'id': u'0', u'team_count': 1})
