Exemplo n.º 1
0
def app_nodb():
    appconf = AppConf("nive.userdb.app")
    appconf.modules.append("nive.userdb.userview.view")
    appconf.modules.append("nive.components.tools.sendMail")
    
    a = UserDB(appconf)
    a.dbConfiguration=DatabaseConf()
    p = Portal()
    p.Register(a)
    a.Startup(None)
    return a
Exemplo n.º 2
0
def app_nodb():
    appconf = AppConf("nive.userdb.app")
    appconf.modules.append("nive.userdb.userview.view")
    appconf.modules.append("nive.components.tools.sendMail")

    a = UserDB(appconf)
    a.dbConfiguration = DatabaseConf()
    p = Portal()
    p.Register(a)
    a.Startup(None)
    return a
Exemplo n.º 3
0
 def test_app(self):
     
     appconf = AppConf("nive.userdb.app")
     #appconf.modules.append("nive.components.extensions.sessionuser")
     
     app = UserDB(appconf)
     app.dbConfiguration=db_app.dbconf
     p = Portal()
     p.Register(app)
     app.Startup(None)
     
     self.assert_(app.usercache)
     
     self.assert_(app.root())
Exemplo n.º 4
0
def app(extmodules=None):
    appconf = AppConf("nive.userdb.app")
    appconf.modules.append("nive.userdb.userview.view")
    appconf.modules.append("nive.components.tools.sendMail")
    
    a = UserDB(appconf)
    a.dbConfiguration=dbconf
    p = Portal()
    p.Register(a)
    a.Startup(None)
    dbfile = DvPath(a.dbConfiguration.dbName)
    if not dbfile.IsFile():
        dbfile.CreateDirectories()
    try:
        a.Query("select id from pool_meta where id=1")
        a.Query("select id from data1 where id=1")
        a.Query("select id from data2 where id=1")
        a.Query("select id from data3 where id=1")
        a.Query("select id from pool_files where id=1")
    except:
        a.GetTool("nive.components.tools.dbStructureUpdater")()
    return a
Exemplo n.º 5
0
def app(extmodules=None):
    appconf = AppConf("nive.userdb.app")
    appconf.modules.append("nive.userdb.userview.view")
    appconf.modules.append("nive.components.tools.sendMail")

    a = UserDB(appconf)
    a.dbConfiguration = dbconf
    p = Portal()
    p.Register(a)
    a.Startup(None)
    dbfile = DvPath(a.dbConfiguration.dbName)
    if not dbfile.IsFile():
        dbfile.CreateDirectories()
    try:
        a.Query("select id from pool_meta where id=1")
        a.Query("select id from data1 where id=1")
        a.Query("select id from data2 where id=1")
        a.Query("select id from data3 where id=1")
        a.Query("select id from pool_files where id=1")
    except:
        a.GetTool("nive.components.tools.dbStructureUpdater")()
    return a