def __init__(self, browser): rand = random.randrange(0, MAX_USERS) row = DBSession.query(User.id, User.username, User.password)[rand] self.id = row.id self.username = row.username self.password = row.password self.br = browser self.logged_in = False