[CalendarServer-changes] [6540] CalendarServer/branches/users/glyph/sharedpool/txdav/base/ propertystore/test/test_sql.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Nov 1 14:28:39 PDT 2010
Revision: 6540
http://trac.macosforge.org/projects/calendarserver/changeset/6540
Author: glyph at apple.com
Date: 2010-11-01 14:28:36 -0700 (Mon, 01 Nov 2010)
Log Message:
-----------
re-order tearDown
Modified Paths:
--------------
CalendarServer/branches/users/glyph/sharedpool/txdav/base/propertystore/test/test_sql.py
Modified: CalendarServer/branches/users/glyph/sharedpool/txdav/base/propertystore/test/test_sql.py
===================================================================
--- CalendarServer/branches/users/glyph/sharedpool/txdav/base/propertystore/test/test_sql.py 2010-11-01 21:28:16 UTC (rev 6539)
+++ CalendarServer/branches/users/glyph/sharedpool/txdav/base/propertystore/test/test_sql.py 2010-11-01 21:28:36 UTC (rev 6540)
@@ -41,6 +41,7 @@
def setUp(self):
self.notifierFactory = StubNotifierFactory()
self.store = yield buildStore(self, self.notifierFactory)
+ self.addCleanup(self.maybeCommitLast)
self._txn = self.store.newTransaction()
self.propertyStore = self.propertyStore1 = yield PropertyStore.load(
"user01", self._txn, 1
@@ -50,7 +51,7 @@
@inlineCallbacks
- def tearDown(self):
+ def maybeCommitLast(self):
if hasattr(self, "_txn"):
result = yield self._txn.commit()
delattr(self, "_txn")
@@ -66,7 +67,7 @@
yield self._txn.commit()
delattr(self, "_txn")
self._txn = self.store.newTransaction()
-
+
store = self.propertyStore1
self.propertyStore = self.propertyStore1 = yield PropertyStore.load(
"user01", self._txn, 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101101/9a18321d/attachment-0001.html>
More information about the calendarserver-changes
mailing list