def db_tables(request, empty_db, app_settings): app_settings_file = request.config.getoption('test_settings_file') assert app_settings_file from ..conftest import engine bootstrap_db(app_settings_file, engine) transaction.commit() def fin(): print "finalizer db_tables" session = empty_db() drop_tables(app_settings, session) transaction.commit() request.addfinalizer(fin) return empty_db # session_factory
def db_tables(request, empty_db): app_settings_file = request.config.getoption('test_settings_file') assert app_settings_file from ..conftest import engine bootstrap_db(app_settings_file, engine) transaction.commit() def fin(): print "finalizer db_tables" session = empty_db() drop_tables(get_config(), session) transaction.commit() request.addfinalizer(fin) return empty_db # session_factory
def db_tables(request, empty_db): """An SQLAlchemy Session Maker fixture with all tables based on testing.ini""" app_settings_file = request.config.getoption('test_settings_file') assert app_settings_file from assembl.conftest import engine bootstrap_db(app_settings_file, engine) def fin(): print("finalizer db_tables") session = empty_db() drop_tables(get_config(), session) session.commit() request.addfinalizer(fin) return empty_db # session_factory
def db_tables(request, empty_db): """An SQLAlchemy Session Maker fixture with all tables based on testing.ini""" app_settings_file = request.config.getoption('test_settings_file') assert app_settings_file from assembl.conftest import engine bootstrap_db(app_settings_file, engine) transaction.commit() def fin(): print "finalizer db_tables" session = empty_db() drop_tables(get_config(), session) transaction.commit() request.addfinalizer(fin) return empty_db # session_factory