Commit e056ca5c authored by Tim Peters's avatar Tim Peters

Convert subtransaction commits to savepoint creations.

Stops deprecation warnings from ZODB 3.6.

Still no idea why deprecation warnings from the ZODB tests
show up (ZODB is already trying to suppress them, and that
works fine in a ZODB checkout and in a Zope3 checkout).
parent d5ebc7c2
......@@ -50,7 +50,7 @@ def _getDB():
root = conn.root()
app = Application()
root['Application']= app
transaction.commit(1)
transaction.savepoint(optimistic=True)
_populate(app)
stuff['db'] = db
conn.close()
......@@ -188,9 +188,10 @@ class TestSessionManager(TestBase):
def testSubcommit(self):
sd = self.app.session_data_manager.getSessionData()
sd.set('foo', 'bar')
# TODO: transaction.commit() always returns None. Is that
# all this is trying to test?
self.failUnless(transaction.commit(1) == None)
# TODO: this is used to test that transaction.commit(1) returned
# None, but transaction.commit(whatever) always returns None (unless
# there's an exception). What is this really trying to test?
transaction.savepoint(optimistic=True)
def testForeignObject(self):
self.assertRaises(InvalidObjectReference, self._foreignAdd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment