'Helper method to create and authenticate a user.'

def setup_user(self, roles=None, **user_info):

    roles_str = ''
    if roles:
        roles_str = ','.join(roles)
    return AutoAuthPage(self.browser, course_id=self.course_id, roles=roles_str, **user_info).visit().get_user_id()
