def admin(db): """测试管理员用户记录 """ user = User(name='admin', email='*****@*****.**', is_admin=True) user.password = PASSWORD user.save() return user
def user(db): """测试普通用户记录 """ user = User(name='test_user', email='*****@*****.**', is_admin=False) user.password = PASSWORD user.save() return user