示例#1
0
文件: conftest.py 项目: uh2k/KaraKara
def app(request, settings):
    from webtest import TestApp
    from karakara import main as karakara_main
    
    #print('setup WebApp')
    app = TestApp(karakara_main({}, **settings))
    
    def finalizer():
        #print('tearDown WebApp')
        pass
    request.addfinalizer(finalizer)
    
    return app
示例#2
0
def app(request, app_ini, DBSession):
    """
    Start KaraKara application
    """
    from webtest import TestApp
    from karakara import main as karakara_main

    app = TestApp(karakara_main({}, **app_ini))

    def finalizer():
        #print('tearDown WebApp')
        pass
    request.addfinalizer(finalizer)

    return app
示例#3
0
def app(request, app_ini):
    """
    Start KaraKara application
    """
    from webtest import TestApp
    from karakara import main as karakara_main

    #print('setup WebApp')
    app = TestApp(karakara_main({}, **app_ini))

    from karakara.model.init_data import init_data
    init_data()

    def finalizer():
        #print('tearDown WebApp')
        pass
    request.addfinalizer(finalizer)

    return app
示例#4
0
def app(request, app_ini):
    """
    Start KaraKara application
    """
    from webtest import TestApp
    from karakara import main as karakara_main

    #print('setup WebApp')
    app = TestApp(karakara_main({}, **app_ini))

    from karakara.model.init_data import init_data
    init_data()

    def finalizer():
        #print('tearDown WebApp')
        pass

    request.addfinalizer(finalizer)

    return app