'Make a comment with appropriate data overridden by the override
parameters and register mock responses for both GET and DELETE on its
endpoint. Also mock GET for the related thread with thread_overrides.'

def register_comment_and_thread(self, overrides=None, thread_overrides=None):

    cs_thread_data = make_minimal_cs_thread({'id': self.thread_id, 'course_id': unicode(self.course.id)})
    cs_thread_data.update((thread_overrides or {}))
    self.register_get_thread_response(cs_thread_data)
    cs_comment_data = make_minimal_cs_comment({'id': self.comment_id, 'course_id': cs_thread_data['course_id'], 'thread_id': cs_thread_data['id'], 'username': self.user.username, 'user_id': str(self.user.id)})
    cs_comment_data.update((overrides or {}))
    self.register_get_comment_response(cs_comment_data)
    self.register_delete_comment_response(self.comment_id)
