[CalendarServer-changes] [1829] CalendarServer/branches/release/CalendarServer-1.0-dev/twistedcaldav /test/test_index.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Aug 27 18:15:06 PDT 2007


Revision: 1829
          http://trac.macosforge.org/projects/calendarserver/changeset/1829
Author:   cdaboo at apple.com
Date:     2007-08-27 18:15:05 -0700 (Mon, 27 Aug 2007)

Log Message:
-----------
Pulled up r1770. This is only a unit test but this fix is needed to make sure the unit tests pass on this branch.

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-1.0-dev/twistedcaldav/test/test_index.py

Modified: CalendarServer/branches/release/CalendarServer-1.0-dev/twistedcaldav/test/test_index.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-1.0-dev/twistedcaldav/test/test_index.py	2007-08-28 00:17:20 UTC (rev 1828)
+++ CalendarServer/branches/release/CalendarServer-1.0-dev/twistedcaldav/test/test_index.py	2007-08-28 01:15:05 UTC (rev 1829)
@@ -56,10 +56,14 @@
 
     def test_reserve_uid_timeout(self):
         uid = "test-test-test"
+        old_timeout = twistedcaldav.index.reservation_timeout_secs
         twistedcaldav.index.reservation_timeout_secs = 2
-        db = Index(self.site.resource)
-        self.assertFalse(db.isReservedUID(uid))
-        db.reserveUID(uid)
-        self.assertTrue(db.isReservedUID(uid))
-        time.sleep(3)
-        self.assertFalse(db.isReservedUID(uid))
+        try:
+            db = Index(self.site.resource)
+            self.assertFalse(db.isReservedUID(uid))
+            db.reserveUID(uid)
+            self.assertTrue(db.isReservedUID(uid))
+            time.sleep(3)
+            self.assertFalse(db.isReservedUID(uid))
+        finally:
+            twistedcaldav.index.reservation_timeout_secs = old_timeout

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070827/fec240aa/attachment.html


More information about the calendarserver-changes mailing list