[CalendarServer-changes] [10593] CalendarServer/branches/users/glyph/unshare-when-access-revoked
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jan 28 19:29:21 PST 2013
Revision: 10593
http://trac.calendarserver.org//changeset/10593
Author: glyph at apple.com
Date: 2013-01-28 19:29:21 -0800 (Mon, 28 Jan 2013)
Log Message:
-----------
Switch to just using patch for testing; don't pass a special argument.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_sharing.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/unshare-when-access-revoked/
Modified: CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_sharing.py
===================================================================
--- CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_sharing.py 2013-01-29 03:29:20 UTC (rev 10592)
+++ CalendarServer/branches/users/glyph/unshare-when-access-revoked/twistedcaldav/test/test_sharing.py 2013-01-29 03:29:21 UTC (rev 10593)
@@ -26,6 +26,7 @@
from twistedcaldav import customxml
from twistedcaldav.config import config
from twistedcaldav.test.util import HomeTestCase, norequest
+from twistedcaldav import sharing
from twistedcaldav.sharing import WikiDirectoryService
from twistedcaldav.resource import CalDAVResource
@@ -712,23 +713,21 @@
"""
access = "read"
-
def stubWikiAccessMethod(userID, wikiID):
return access
+ self.patch(sharing, "getWikiAccess", stubWikiAccessMethod)
sharedName = yield self.wikiSetup()
request = SimpleRequest(self.site, "GET", "/404")
collection = yield request.locateResource("/" + sharedName)
# Simulate the wiki server granting Read access
- acl = (yield collection.shareeAccessControlList(request,
- wikiAccessMethod=stubWikiAccessMethod))
+ acl = (yield collection.shareeAccessControlList(request))
self.assertFalse("<write/>" in acl.toxml())
# Simulate the wiki server granting Read-Write access
access = "write"
- acl = (yield collection.shareeAccessControlList(request,
- wikiAccessMethod=stubWikiAccessMethod))
+ acl = (yield collection.shareeAccessControlList(request))
self.assertTrue("<write/>" in acl.toxml())
@@ -743,7 +742,6 @@
access = "write"
def stubWikiAccessMethod(userID, wikiID):
return access
- from twistedcaldav import sharing
self.patch(sharing, "getWikiAccess", stubWikiAccessMethod)
@inlineCallbacks
def listChildrenViaPropfind():
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130128/7fc62c3d/attachment.html>
More information about the calendarserver-changes
mailing list