def setUp(self): self.config = testing.setUp() from sqlalchemy import create_engine engine = create_engine('sqlite://') from babytracker.models import DBSession, Base DBSession.configure(bind=engine) Base.metadata.create_all(engine)
def setup_database(settings): if 'DATABASE_URL' in os.environ: # Used on Heroku settings['sqlalchemy.url'] = os.environ['DATABASE_URL'] engine = engine_from_config(settings, 'sqlalchemy.') DBSession.configure(bind=engine) Base.metadata.create_all(engine)
def setUp(self): self.config = testing.setUp() from sqlalchemy import create_engine engine = create_engine("sqlite://") from babytracker.models import DBSession, Base DBSession.configure(bind=engine) Base.metadata.create_all(engine)