From: Mike Bayer Date: Fri, 17 Aug 2007 18:14:11 +0000 (+0000) Subject: - turned twophase=True on in test X-Git-Tag: rel_0_4beta4~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=75f69f85a283a5ffd1a1df44f38118d4d7c2857a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - turned twophase=True on in test - TLEngine raises notimplemented for two-phase --- diff --git a/lib/sqlalchemy/engine/threadlocal.py b/lib/sqlalchemy/engine/threadlocal.py index 164c50f517..62f402be5c 100644 --- a/lib/sqlalchemy/engine/threadlocal.py +++ b/lib/sqlalchemy/engine/threadlocal.py @@ -39,6 +39,9 @@ class TLSession(object): self.reset() def begin_twophase(self, xid=None): + raise NotImplementedError("Two phase transactions not yet implemented for 'threadlocal' strategy") + + def _dont_begin_twophase(self, xid=None): if self.__tcount == 0: self.__transaction = self.get_connection() self.__trans = self.__transaction._begin_twophase(xid=xid) diff --git a/test/orm/session.py b/test/orm/session.py index 381b54d551..5cf56ac4ad 100644 --- a/test/orm/session.py +++ b/test/orm/session.py @@ -250,7 +250,7 @@ class SessionTest(AssertMixin): mapper(Address, addresses) engine2 = create_engine(testbase.db.url) - sess = create_session(transactional=False, autoflush=False, twophase=False) + sess = create_session(transactional=False, autoflush=False, twophase=True) sess.bind_mapper(User, testbase.db) sess.bind_mapper(Address, engine2) sess.begin()