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