Ejemplo n.º 1
0
# -*- coding: utf-8 -*-

from wp_frontend import tests
from wp_frontend.tests import create_entries
from webtest import TestApp
import wp_frontend

tests.createEngineAndInitDB()


def make_testapp():
    app = wp_frontend.main({}, sql_init_function=tests.init_and_recreate_db, **tests.settings)
    return TestApp(app)


def create_all_entries():
    create_entries.add_get_data_entries_to_db(tests.getTransaction(), tests.getSession())
    create_entries.add_set_data_entries_to_db(tests.getTransaction(), tests.getSession())
 def setUpClass(cls):
     tmp_session = tests.createEngineAndInitDB()
     tmp_session.remove()
 def setUpClass(cls):
     tmp_session = tests.createEngineAndInitDB()
     create_entries.add_get_data_entries_to_db(tests.getTransaction(), 
                                               tmp_session)
     tmp_session.remove()
Ejemplo n.º 4
0
 def setUpClass(cls):
     tmp_session = tests.createEngineAndInitDB()
     create_entries.add_backup_templates(tests.getTransaction(),
                                         tmp_session)
     tmp_session.remove()