Exemplo n.º 1
0
def _initTestingDB():
    from sqlalchemy import create_engine
    from OSMTM.models import initialize_sql, populate

    session = initialize_sql(create_engine("sqlite:///:memory:"))
    populate()
    return session
Exemplo n.º 2
0
    def setUp(self):
        from OSMTM import main
        settings = {
            'sqlalchemy.url': 'sqlite:///:memory:'
        }
        self.app = main({}, **settings)
        from webtest import TestApp
        self.testapp = TestApp(self.app)

        from OSMTM.models import populate
        populate()
Exemplo n.º 3
0
def _initTestingDB():
    from sqlalchemy import create_engine
    from OSMTM.models import initialize_sql, populate
    session = initialize_sql(create_engine('sqlite:///:memory:'))
    populate()
    return session