Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Ixnay on the eferredGeneratorsday

  • Loading branch information
wsanchez committed May 25, 2008
1 parent b63a6f9 commit 7ee64664e6b00379330efd9e1ab5e68eb002bb2e
Showing with 5 additions and 10 deletions.
  1. +5 −10 twistedcaldav/directory/test/test_principal.py
@@ -16,8 +16,7 @@

import os

from twisted.internet.defer import deferredGenerator
from twisted.internet.defer import waitForDeferred
from twisted.internet.defer import inlineCallbacks
from twisted.web2.dav import davxml
from twisted.web2.dav.fileop import rmdir
from twisted.web2.dav.resource import AccessDeniedError
@@ -239,26 +238,22 @@ def test_displayName(self):
for provisioningResource, recordType, recordResource, record in self._allRecords():
self.failUnless(recordResource.displayName())

@deferredGenerator
@inlineCallbacks
def test_groupMembers(self):
"""
DirectoryPrincipalResource.groupMembers()
"""
for provisioningResource, recordType, recordResource, record in self._allRecords():
d = waitForDeferred(recordResource.groupMembers())
yield d
members = d.getResult()
members = yield recordResource.groupMembers()
self.failUnless(set(record.members()).issubset(set(r.record for r in members)))

@deferredGenerator
@inlineCallbacks
def test_groupMemberships(self):
"""
DirectoryPrincipalResource.groupMemberships()
"""
for provisioningResource, recordType, recordResource, record in self._allRecords():
d = waitForDeferred(recordResource.groupMemberships())
yield d
memberships = d.getResult()
memberships = yield recordResource.groupMemberships()
self.failUnless(set(record.groups()).issubset(set(r.record for r in memberships if hasattr(r, "record"))))

def test_proxies(self):

0 comments on commit 7ee6466

Please sign in to comment.
You can’t perform that action at this time.