'Test correctness of the author_label field.
The label should be "Staff", "Staff", or "Community TA" for the
Administrator, Moderator, and Community TA roles, respectively, but
the label should not be present if the content is anonymous.
role_name is the name of the author\'s role.
anonymous is the value of the anonymous field in the content.
expected_label is the expected value of the author_label field in the
API output.'

@ddt.data((FORUM_ROLE_ADMINISTRATOR, False, 'Staff'), (FORUM_ROLE_ADMINISTRATOR, True, None), (FORUM_ROLE_MODERATOR, False, 'Staff'), (FORUM_ROLE_MODERATOR, True, None), (FORUM_ROLE_COMMUNITY_TA, False, 'Community    TA'), (FORUM_ROLE_COMMUNITY_TA, True, None), (FORUM_ROLE_STUDENT, False, None), (FORUM_ROLE_STUDENT, True, None))
@ddt.unpack
def test_author_labels(self, role_name, anonymous, expected_label):

    self.create_role(role_name, [self.author])
    serialized = self.serialize(self.make_cs_content({'anonymous': anonymous}))
    self.assertEqual(serialized['author_label'], expected_label)
