def load_config(filename='development.ini', basePath='.'): config = load_settings(filename, basePath) engine = engine_from_config(config, 'sqlalchemy.') DBSession.configure(bind=engine) initialize_sql(engine)
def load_config(filename="development.ini", basePath="."): config = load_settings(filename, basePath) engine = engine_from_config(config, "sqlalchemy.") DBSession.configure(bind=engine) initialize_sql(engine)
def setUp(self): connection = self.engine.connect() # begin a non-ORM transaction self.trans = connection.begin() # bind an individual Session to the connection DBSession.configure(bind=connection) self.session = self.Session(bind=connection) Base.session = self.session