'Ensure thread anonymity is properly considered in serializing
endorsed_by.'

def test_endorsed_by_anonymity(self):

    thread = self.make_minimal_cs_thread({'anonymous': True, 'children': [make_minimal_cs_comment({'username': self.user.username, 'endorsement': {'user_id': str(self.author.id), 'time': '2015-05-18T12:34:56Z'}})]})
    actual_comments = self.get_comment_list(thread).data['results']
    self.assertIsNone(actual_comments[0]['endorsed_by'])
