def setup_orderer(self): self.orderer = create_user(1) self.db.session.add(self.orderer) self.db.session.commit() session_token = create_session_token(self.orderer.id) self.db.session.add(session_token) self.db.session.commit()
def create_admin(self): self.admin = create_user(99, screen_name='Admin') db.session.add(self.admin) db.session.commit() session_token = create_session_token(self.admin.id) self.db.session.add(session_token) self.db.session.commit()
def create_user(self): user = create_user(8516) self.db.session.add(user) self.db.session.commit() session_token = create_session_token(user.id) self.db.session.add(session_token) self.db.session.commit() return user
def create_user(self, number, screen_name): user = create_user(number, screen_name=screen_name) self.db.session.add(user) self.db.session.commit() session_token = create_session_token(user.id) self.db.session.add(session_token) self.db.session.commit() return user
def create_player(self): player = create_user(27) self.db.session.add(player) self.db.session.commit() session_token = create_session_token(player.id) self.db.session.add(session_token) self.db.session.commit() return player