def test(self):
		e = sa_engine.get_engine()
		result = e.execute("select 1").scalar()
		self.failUnless(result)
Ejemplo n.º 2
0
from sqlalchemy.orm import scoped_session, sessionmaker

import sasi.sa.engine as sa_engine

Session = scoped_session(sessionmaker(bind=sa_engine.get_engine()))

def get_session():
	return Session()

def close_session():
	Session.remove()
Ejemplo n.º 3
0
	def setUpClass(cls):
		cls.engine = sa_engine.get_engine()
		cls.Session = sessionmaker()