'Calls API and verifies the response'

def _verify_response(self, should_succeed, error_type, role=None):

    if role:
        role(self.course.id).add_users(self.user)
    response = self.api_response(expected_response_code=None)
    if should_succeed:
        self.verify_success(response)
    else:
        self.verify_failure(response, error_type)
