Skip to content

Commit

Permalink
Merge branch 'univenv'
Browse files Browse the repository at this point in the history
  • Loading branch information
EliAndrewC committed Jul 3, 2014
2 parents 9fedb53 + 10fa4ee commit 99181b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion sideboard/lib/sa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ class _SessionInitializer(type):
def __new__(cls, name, bases, attrs):
SessionClass = type.__new__(cls, name, bases, attrs)
if hasattr(SessionClass, 'engine'):
print('modules', SessionClass.__module__, [bc for bc in _SessionInitializer._base_classes])
if not hasattr(SessionClass, 'BaseClass'):
for module, bc in _SessionInitializer._base_classes.items():
if module == SessionClass.__module__:
Expand Down
3 changes: 2 additions & 1 deletion sideboard/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ def patch_session(Session, request):
db_path = '/tmp/{}.db'.format(name)
Session.engine = sqlalchemy.create_engine('sqlite+pysqlite:///' + db_path)
event.listen(Session.engine, 'connect', lambda conn, record: conn.execute('pragma foreign_keys=ON'))
Session.session_factory = sessionmaker(bind=Session.engine, autoflush=False, autocommit=False)
Session.session_factory = sessionmaker(bind=Session.engine, autoflush=False, autocommit=False,
query_cls=Session.QuerySubclass)
Session.initialize_db(drop=True)

0 comments on commit 99181b3

Please sign in to comment.