<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[12854] CalendarServer/trunk/calendarserver/webadmin/test/test_resource.py</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/12854">12854</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2014-03-07 16:28:02 -0800 (Fri, 07 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>obsolete tests</pre>

<h3>Removed Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarserverwebadmintesttest_resourcepy">CalendarServer/trunk/calendarserver/webadmin/test/test_resource.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarserverwebadmintesttest_resourcepy"></a>
<div class="delfile"><h4>Deleted: CalendarServer/trunk/calendarserver/webadmin/test/test_resource.py (12853 => 12854)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/webadmin/test/test_resource.py        2014-03-08 00:08:43 UTC (rev 12853)
+++ CalendarServer/trunk/calendarserver/webadmin/test/test_resource.py        2014-03-08 00:28:02 UTC (rev 12854)
</span><span class="lines">@@ -1,501 +0,0 @@
</span><del>-##
-# Copyright (c) 2011-2014 Apple Inc. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-
-&quot;&quot;&quot;
-Tests for L{calendarserver.webadmin.resource}.
-&quot;&quot;&quot;
-
-import cgi
-
-from functools import partial
-
-from twistedcaldav.test.util import TestCase
-
-from twisted.web.microdom import parseString, getElementsByTagName
-from twisted.web.domhelpers import gatherTextNodes
-
-
-from calendarserver.tap.util import FakeRequest
-from twisted.internet.defer import inlineCallbacks
-from twisted.internet.defer import returnValue
-from twisted.internet.defer import succeed
-from calendarserver.webadmin.resource import WebAdminResource
-
-from txdav.xml.rfc3744 import GroupMemberSet
-from txdav.xml.rfc2518 import DisplayName
-
-from txweb2.http import HTTPError
-from txweb2.responsecode import CONFLICT
-from txdav.xml.rfc2518 import HRef
-from twistedcaldav.directory.directory import DirectoryRecord
-
-
-
-class RenderingTests(TestCase):
-    &quot;&quot;&quot;
-    Tests for HTML rendering L{WebAdminResource}.
-    &quot;&quot;&quot;
-
-    def expectRecordSearch(self, searchString, result):
-        &quot;&quot;&quot;
-        Expect that a search will be issued via with the given fields, and will
-        yield the given result.
-        &quot;&quot;&quot;
-        self.expectedSearches[(searchString,)] = result
-
-
-    def recordsMatchingTokens(self, tokens):
-        &quot;&quot;&quot;
-        Pretend to be a directory object for the purposes of testing.
-        &quot;&quot;&quot;
-        return succeed(self.expectedSearches.pop(tuple(tokens)))
-
-
-    def setUp(self):
-        self.expectedSearches = {}
-        self.resource = WebAdminResource(self.mktemp(), None, self, None)
-
-
-    @inlineCallbacks
-    def renderPage(self, args={}):
-        &quot;&quot;&quot;
-        Render a page, returning a Deferred that fires with the HTML as a
-        result.
-        &quot;&quot;&quot;
-        req = FakeRequest(method='GET', path='/admin',
-                          rootResource=self.resource)
-        req.args = args
-        response = yield self.resource.render(req)
-        self.assertEquals(response.code, 200)
-        content = response.stream.mem
-        document = parseString(content)
-        returnValue(document)
-
-
-    @inlineCallbacks
-    def test_simplestRender(self):
-        &quot;&quot;&quot;
-        Rendering a L{WebAdminResource} will result in something vaguely
-        parseable as HTML.
-        &quot;&quot;&quot;
-        document = yield self.renderPage()
-        self.assertEquals(document.documentElement.tagName, 'html')
-
-
-    def expectSomeRecords(self):
-        &quot;&quot;&quot;
-        Sample invocation of expectRecordSearch that includes two sample
-        directory records.
-        &quot;&quot;&quot;
-        self.expectRecordSearch(
-            &quot;bob&quot;, [
-                DirectoryRecord(
-                    service=self, recordType=recordType, guid=None,
-                    authIDs=authIds, emailAddresses=tuple(emails),
-                    shortNames=tuple(shortNames), fullName=fullName
-                )
-                for (shortNames, fullName, authIds, emails, recordType)
-                in [
-                    ([&quot;bobd&quot;], &quot;Bob Dobson&quot;, [&quot;bobdlogin&quot;],
-                     [&quot;bobd@example.com&quot;], 'sudoers'),
-                    ([&quot;bob&quot;], &quot;Bob Bobson&quot;, [&quot;boblogin&quot;],
-                     [&quot;bob@example.com&quot;, &quot;bob@other.example.com&quot;], 'users'),
-                   ]
-            ])
-
-
-    @inlineCallbacks
-    def test_resourceSearch(self):
-        &quot;&quot;&quot;
-        Searching for resources should result in an HTML table resource search.
-        &quot;&quot;&quot;
-        self.expectSomeRecords()
-        document = yield self.renderPage(dict(resourceSearch=[&quot;bob&quot;]))
-
-        # Form is filled out with existing input.
-        self.assertEquals(
-            document.getElementById(&quot;txt_resourceSearch&quot;).getAttribute(&quot;value&quot;),
-            &quot;bob&quot;
-        )
-        tables = getElementsByTagName(document, &quot;table&quot;)
-        # search results are the first table
-        rows = getElementsByTagName(tables[0], 'tr')
-        self.assertEquals(len(rows), 3)
-        firstRowCells = getElementsByTagName(rows[1], 'td')
-        self.assertEquals(
-            [gatherTextNodes(cell) for cell in firstRowCells[1:]],
-            [&quot;Bob Bobson&quot;, &quot;User&quot;, &quot;bob&quot;, &quot;boblogin&quot;,
-             &quot;bob@example.com, bob@other.example.com&quot;]
-        )
-        [resourceLink] = getElementsByTagName(
-            firstRowCells[0], 'a')
-        self.assertEquals(
-            resourceLink.getAttribute(&quot;href&quot;),
-            &quot;/admin/old/?resourceId=users:bob&quot;
-        )
-        self.assertEquals(gatherTextNodes(resourceLink), &quot;select&quot;)
-        self.assertNotIn(
-            &quot;No matches found for resource bob&quot;,
-            gatherTextNodes(document)
-        )
-
-
-    @inlineCallbacks
-    def test_proxySearch(self):
-        &quot;&quot;&quot;
-        When the user searches for a proxy, the results are displayed in a
-        table, in a form that will allow them to submit it to add new read or
-        write proxies.
-        &quot;&quot;&quot;
-        self.expectSomeRecords()
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        document = yield self.renderPage(dict(resourceId=[&quot;qux&quot;],
-                                              proxySearch=[&quot;bob&quot;]))
-
-        # Form is filled out with existing input.
-        self.assertEquals(
-            document.getElementById(&quot;txt_proxySearch&quot;).getAttribute(&quot;value&quot;),
-            &quot;bob&quot;
-        )
-        proxyAddForm = document.getElementById(&quot;frm_proxyAdd&quot;)
-        [proxyResultsTable] = getElementsByTagName(proxyAddForm, &quot;table&quot;)
-
-        rows = getElementsByTagName(proxyResultsTable, 'tr')
-        self.assertEquals(len(rows), 3)
-        firstRowCells = getElementsByTagName(rows[1], 'td')
-        self.assertEquals(
-            [gatherTextNodes(cell) for cell in firstRowCells[1:]],
-            [&quot;User&quot;, &quot;bob&quot;, &quot;bob@example.com, bob@other.example.com&quot;, &quot;&quot;]
-        )
-        self.assertNotIn(
-            &quot;No matches found for proxy resource bob&quot;,
-            gatherTextNodes(document)
-        )
-
-
-    @inlineCallbacks
-    def test_emptyProxySearch(self):
-        &quot;&quot;&quot;
-        When no results are found for a search for proxies, a relevant message
-        should be displayed and the table/form for results should not be.
-        &quot;&quot;&quot;
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        self.expectRecordSearch(&quot;bob&quot;, [])
-        document = yield self.renderPage(dict(resourceId=[&quot;qux&quot;],
-                                              proxySearch=[&quot;bob&quot;]))
-        self.assertEquals(
-            document.getElementById(&quot;txt_proxySearch&quot;).getAttribute(&quot;value&quot;),
-            &quot;bob&quot;
-        )
-        proxyAddForm = document.getElementById(&quot;frm_proxyAdd&quot;)
-        self.assertIdentical(proxyAddForm, None)
-        self.assertIn(
-            &quot;No matches found for proxy resource bob&quot;,
-            gatherTextNodes(document)
-        )
-
-
-    @inlineCallbacks
-    def test_noResourceFound(self):
-        &quot;&quot;&quot;
-        Searching for resources which don't exist should result in an
-        informative message.
-        &quot;&quot;&quot;
-        self.expectRecordSearch(&quot;bob&quot;, [])
-        document = yield self.renderPage(dict(resourceSearch=[&quot;bob&quot;]))
-        self.assertIn(
-            &quot;No matches found for resource bob&quot;,
-            gatherTextNodes(document)
-        )
-        # Search results table should not be displayed.
-        self.assertIdentical(document.getElementById(&quot;tab_searchResults&quot;), None)
-
-
-    @inlineCallbacks
-    def test_selectResourceById(self):
-        &quot;&quot;&quot;
-        When a resource is selected by a 'resourceId' parameter,
-        &quot;&quot;&quot;
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        document = yield self.renderPage(dict(resourceId=[&quot;qux&quot;]))
-        [detailsTitle] = getElementsByTagName(document, 'h3')
-        detailString = gatherTextNodes(detailsTitle)
-        self.assertEquals(detailString,
-                          &quot;Resource Details: Hello Fake Resource: 'qux'&quot;)
-        hiddenResourceId = document.getElementById(
-            &quot;hdn_resourceId&quot;).getAttribute(&quot;value&quot;)
-        self.assertEquals(hiddenResourceId, &quot;qux&quot;)
-
-        autoScheduleMenu = document.getElementById(&quot;sel_autoSchedule&quot;)
-
-        # Now, some assertions about features that are covered in other tests
-        # which should be turned _off_ here since we're not asking for them.
-
-        # Not an auto-schedule resource; there should be no auto-schedule menu.
-        self.assertIdentical(autoScheduleMenu, None)
-        # No resource search present; we shouldn't be performing the search.
-        self.assertNotIn(&quot;No matches found for resource&quot;,
-                         gatherTextNodes(document))
-        self.assertIdentical(document.getElementById(&quot;tab_searchResults&quot;), None)
-        # I'm not attempting to retrieve a property, there's nothing to fail to
-        # parse.
-        self.assertNotIn(&quot;Unable to parse property&quot;, gatherTextNodes(document))
-        # I'm not searching for proxies, so there shouldn't be any results.
-        self.assertNotIn(&quot;No matches found for proxy resource&quot;,
-                         gatherTextNodes(document))
-
-
-    @inlineCallbacks
-    def test_davProperty(self):
-        &quot;&quot;&quot;
-        When a resource is selected by a resourceId parameter, and a DAV
-        property is selected by the 'davPropertyName' parameter, that property
-        will displayed.
-        &quot;&quot;&quot;
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        document = yield self.renderPage(
-            dict(resourceId=[&quot;qux&quot;],
-                 davPropertyName=[&quot;DAV:#displayname&quot;])
-        )
-        propertyName = document.getElementById('txt_davPropertyName')
-        self.assertEquals(propertyName.getAttribute(&quot;value&quot;),
-                          &quot;DAV:#displayname&quot;)
-        propertyValue = DisplayName(&quot;The Name To Display&quot;).toxml()
-        self.assertIn(cgi.escape(propertyValue),
-                      gatherTextNodes(document))
-        self.assertNotIn(&quot;Unable to parse property to read:&quot;,
-                         gatherTextNodes(document))
-
-
-    @inlineCallbacks
-    def test_notADavProperty(self):
-        &quot;&quot;&quot;
-        When a DAV property is selected without the proper syntax (i.e. no &quot;#&quot;
-        to separate namespace and name), an error will be displayed.
-        &quot;&quot;&quot;
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        document = yield self.renderPage(
-            dict(resourceId=[&quot;qux&quot;],
-                 davPropertyName=[&quot;blub&quot;])
-        )
-        propertyName = document.getElementById('txt_davPropertyName')
-        self.assertEquals(propertyName.getAttribute(&quot;value&quot;),
-                          &quot;blub&quot;)
-        propertyValue = &quot;Unable to parse property to read: blub&quot;
-        self.assertIn(cgi.escape(propertyValue),
-                      gatherTextNodes(document))
-
-
-    @inlineCallbacks
-    def test_autoScheduleMenu(self):
-        &quot;&quot;&quot;
-        When rendering a resource, an &quot;Auto-Schedule&quot; menu with &quot;Yes/No&quot; options
-        should be displayed.
-        &quot;&quot;&quot;
-        for expectValue in [True, False]:
-
-            self.resource.getResourceById = partial(FakePrincipalResource, self,
-                                                    recordType='resources',
-                                                    autosched=expectValue)
-            document = yield self.renderPage(dict(resourceId=[&quot;qux&quot;]))
-            autoScheduleMenu = document.getElementById(&quot;sel_autoSchedule&quot;)
-            self.assertEquals(autoScheduleMenu.getAttribute(&quot;name&quot;),
-                              &quot;autoSchedule&quot;)
-
-            yesno = getElementsByTagName(autoScheduleMenu, 'option')
-
-            # Sanity checks to make sure we got the right items
-            self.assertEquals(yesno[0].getAttribute(&quot;value&quot;), &quot;true&quot;)
-            self.assertEquals(yesno[1].getAttribute(&quot;value&quot;), &quot;false&quot;)
-
-            [expectedTrue, expectedFalse] = [yesno[not expectValue],
-                                             yesno[expectValue]]
-
-            self.assertEquals(expectedTrue.hasAttribute(&quot;selected&quot;), True)
-            self.assertEquals(expectedFalse.hasAttribute(&quot;selected&quot;), False)
-            self.assertEquals(expectedTrue.getAttribute(&quot;selected&quot;), &quot;selected&quot;)
-
-
-    @inlineCallbacks
-    def test_autoScheduleModeMenu(self):
-        &quot;&quot;&quot;
-        When rendering a resource, an &quot;Auto-Schedule Mode&quot; menu with various options
-        should be displayed.
-        &quot;&quot;&quot;
-
-        modes = (&quot;default&quot;, &quot;none&quot;, &quot;accept-always&quot;, &quot;decline-always&quot;, &quot;accept-if-free&quot;, &quot;decline-if-busy&quot;, &quot;automatic&quot;,)
-
-        for ctr, expectValue in enumerate(modes):
-
-            self.resource.getResourceById = partial(FakePrincipalResource, self,
-                                                    recordType='resources',
-                                                    autosched=True,
-                                                    autoschedmode=expectValue)
-            document = yield self.renderPage(dict(resourceId=[&quot;qux&quot;]))
-            autoScheduleModeMenu = document.getElementById(&quot;sel_autoScheduleMode&quot;)
-            self.assertEquals(autoScheduleModeMenu.getAttribute(&quot;name&quot;),
-                              &quot;autoScheduleMode&quot;)
-
-            popup = getElementsByTagName(autoScheduleModeMenu, 'option')
-
-            # Sanity checks to make sure we got the right items
-            for i, mode in enumerate(modes):
-                self.assertEquals(popup[i].getAttribute(&quot;value&quot;), mode)
-
-            popupValues = [popup[i] for i in range(len(modes))]
-            for i in range(len(modes)):
-                self.assertEquals(popupValues[i].hasAttribute(&quot;selected&quot;), ctr == i)
-            self.assertEquals(popupValues[ctr].getAttribute(&quot;selected&quot;), &quot;selected&quot;)
-
-
-    @inlineCallbacks
-    def test_proxiesListing(self):
-        &quot;&quot;&quot;
-        Resource principals will have their proxies listed in a table.
-        &quot;&quot;&quot;
-        def fakeResourceById(request, resid):
-            return FakePrincipalResource(self, request, resid,
-                                         recordType=&quot;resources&quot;)
-
-        self.resource.getResourceById = fakeResourceById
-        document = yield self.renderPage(dict(resourceId=[&quot;qux&quot;]))
-        proxiesForm = document.getElementById(&quot;frm_proxies&quot;)
-        [proxiesTable] = getElementsByTagName(proxiesForm, &quot;table&quot;)
-        rows = getElementsByTagName(proxiesTable, &quot;tr&quot;)
-
-        # header + 3 data rows (see FakePrincipalResource)
-        self.assertEquals(len(rows), 4)
-        firstRowCells = getElementsByTagName(rows[1], &quot;td&quot;)
-        # name, buttons, name, buttons
-        self.assertEquals(len(firstRowCells), 4)
-        lastRowCells = getElementsByTagName(rows[-1], &quot;td&quot;)
-        # name, buttons, blank space
-        self.assertEquals(len(lastRowCells), 3)
-        self.assertEquals(lastRowCells[-1].getAttribute(&quot;colspan&quot;), &quot;2&quot;)
-
-        self.assertNotIn(&quot;This resource has no proxies.&quot;,
-                         ''.join(gatherTextNodes(document)))
-
-
-    @inlineCallbacks
-    def test_noProxiesListing(self):
-        &quot;&quot;&quot;
-        When the selected resource principal has no proxies, the page should
-        display a message saying so.
-        &quot;&quot;&quot;
-        self.resource.getResourceById = partial(FakePrincipalResource, self,
-                                                recordType='resources',
-                                                hasProxies=False)
-        document = yield self.renderPage(dict(resourceId=['qux']))
-        self.assertIn(&quot;This resource has no proxies.&quot;,
-                      ''.join(gatherTextNodes(document)))
-
-
-    @inlineCallbacks
-    def test_noDavProperty(self):
-        &quot;&quot;&quot;
-        When a DAV property is not found, an error will be displayed.
-        &quot;&quot;&quot;
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        document = yield self.renderPage(
-            dict(resourceId=[&quot;qux&quot;],
-                 davPropertyName=[&quot;DAV:#blub&quot;])
-        )
-        propertyName = document.getElementById('txt_davPropertyName')
-        self.assertEquals(propertyName.getAttribute(&quot;value&quot;),
-                          &quot;DAV:#blub&quot;)
-        propertyValue = &quot;No such property: DAV:#blub&quot;
-        self.assertIn(cgi.escape(propertyValue),
-                      gatherTextNodes(document))
-
-    # Properties for being a fake directory service as far as the implementation
-    # of DirectoryRecord is concerned.
-    realmName = 'Fake'
-    guid = '28c57671-2bf8-4ebd-bc45-fda5ffcee1e8'
-
-
-
-class FakePrincipalResource(object):
-    def __init__(self, test, req=None, resid='no-id-given',
-                 autosched=True, autoschedmode=None,
-                 recordType=&quot;users&quot;, extraProperties=(), hasProxies=True):
-        self.test = test
-        self.resid = resid
-        self.autosched = autosched
-        self.autoschedmode = autoschedmode
-        self.recordType = recordType
-        self.extraProperties = extraProperties
-        self.hasProxies = hasProxies
-
-
-    @property
-    def record(self):
-        authIds = ['fake auth id']
-        emails = ['fake email']
-        shortNames = [self.resid]
-        fullName = 'nobody'
-        return DirectoryRecord(
-            service=self.test, recordType=self.recordType, guid=None,
-            authIDs=authIds, emailAddresses=tuple(emails),
-            shortNames=tuple(shortNames), fullName=fullName
-        )
-
-
-    def __str__(self):
-        return 'Hello Fake Resource: %r' % (self.resid,)
-
-
-    def getChild(self, name):
-        if name == 'calendar-proxy-read':
-            if self.hasProxies:
-                proxyProps = [HRef(&quot;read-1&quot;), HRef(&quot;read-2&quot;), HRef(&quot;read-3&quot;)]
-            else:
-                proxyProps = []
-            return FakePrincipalResource(
-                self.test,
-                extraProperties=[GroupMemberSet(*proxyProps)]
-            )
-        elif name == 'calendar-proxy-write':
-            if self.hasProxies:
-                proxyProps = [HRef(&quot;write-1&quot;), HRef(&quot;write-2&quot;)]
-            else:
-                proxyProps = []
-            return FakePrincipalResource(
-                self.test,
-                extraProperties=[GroupMemberSet(*proxyProps)]
-            )
-
-
-    @inlineCallbacks
-    def readProperty(self, name, request):
-        yield None
-        if not isinstance(name, tuple):
-            name = name.qname()
-        for prop in self.extraProperties:
-            if name == prop.qname():
-                returnValue(prop)
-        if name == DisplayName.qname():
-            returnValue(DisplayName(&quot;The Name To Display&quot;))
-        else:
-            raise HTTPError(CONFLICT)
-
-
-    def getAutoSchedule(self):
-        return self.autosched
-
-
-    def getAutoScheduleMode(self):
-        return self.autoschedmode
</del></span></pre>
</div>
</div>

</body>
</html>