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

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

    self.create_role(role_name, [self.endorser])
    serialized = self.serialize(self.make_cs_content(with_endorsement=True))
    self.assertEqual(serialized['endorsed_by_label'], expected_label)
