[CalendarServer-changes] [5915] CalendarServer/branches/new-store

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 19 15:42:42 PDT 2010


Revision: 5915
          http://trac.macosforge.org/projects/calendarserver/changeset/5915
Author:   glyph at apple.com
Date:     2010-07-19 15:42:41 -0700 (Mon, 19 Jul 2010)
Log Message:
-----------
fix for test_PUT_no_parent

Modified Paths:
--------------
    CalendarServer/branches/new-store/twext/web2/dav/method/put.py
    CalendarServer/branches/new-store/twistedcaldav/test/test_DAV.py

Modified: CalendarServer/branches/new-store/twext/web2/dav/method/put.py
===================================================================
--- CalendarServer/branches/new-store/twext/web2/dav/method/put.py	2010-07-19 22:41:54 UTC (rev 5914)
+++ CalendarServer/branches/new-store/twext/web2/dav/method/put.py	2010-07-19 22:42:41 UTC (rev 5915)
@@ -54,6 +54,11 @@
         yield parent
         parent = parent.getResult()
 
+        if not parent.exists():
+            raise HTTPError(
+                StatusResponse(
+                    responsecode.CONFLICT,
+                    "cannot PUT to non-existent parent"))
         x = waitForDeferred(parent.authorize(request, (davxml.Bind(),)))
         yield x
         x.getResult()

Modified: CalendarServer/branches/new-store/twistedcaldav/test/test_DAV.py
===================================================================
--- CalendarServer/branches/new-store/twistedcaldav/test/test_DAV.py	2010-07-19 22:41:54 UTC (rev 5914)
+++ CalendarServer/branches/new-store/twistedcaldav/test/test_DAV.py	2010-07-19 22:42:41 UTC (rev 5915)
@@ -46,9 +46,6 @@
 class MOVE          (twext.web2.dav.test.test_move.MOVE                  ): resource_class = MyResource
 class OPTIONS       (twext.web2.dav.test.test_options.OPTIONS            ): resource_class = MyResource
 class PROP          (twext.web2.dav.test.test_prop.PROP                  ): resource_class = MyResource
-class PUT           (twext.web2.dav.test.test_put.PUT                    ):
-    resource_class = MyResource
-    test_PUT_no_parent = ignored
-
+class PUT           (twext.web2.dav.test.test_put.PUT                    ): resource_class = MyResource
 class REPORT        (twext.web2.dav.test.test_report.REPORT              ): resource_class = MyResource
 class REPORT_expand (twext.web2.dav.test.test_report_expand.REPORT_expand): resource_class = MyResource
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100719/c2a62727/attachment.html>


More information about the calendarserver-changes mailing list