Example #1
0
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)
Example #2
0
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)
Example #3
0
    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
Example #4
0
    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