<!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>[7974] CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin</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.macosforge.org/projects/calendarserver/changeset/7974">7974</a></dd>
<dt>Author</dt> <dd>glyph@apple.com</dd>
<dt>Date</dt> <dd>2011-08-11 21:54:10 -0700 (Thu, 11 Aug 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>remove old rendering implementation</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServerbranchesusersglyphimipandadminhtmlcalendarserverwebadminresourcepy">CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py</a></li>
<li><a href="#CalendarServerbranchesusersglyphimipandadminhtmlcalendarserverwebadmintesttest_resourcepy">CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServerbranchesusersglyphimipandadminhtmlcalendarserverwebadminresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py (7973 => 7974)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py      2011-08-12 04:53:59 UTC (rev 7973)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/resource.py 2011-08-12 04:54:10 UTC (rev 7974)
</span><span class="lines">@@ -514,88 +514,8 @@
</span><span class="cx">     def createSimilarFile(self, path):
</span><span class="cx">         return DAVFile(path, principalCollections=self.principalCollections())
</span><span class="cx"> 
</span><del>-    def directoryStyleSheet(self):
-        return (
-            "th, .even td, .odd td { padding-right: 0.5em; font-family: monospace}"
-            ".even-dir { background-color: #efe0ef }"
-            ".even { background-color: #eee }"
-            ".odd-dir {background-color: #f0d0ef }"
-            ".odd { background-color: #dedede }"
-            ".icon { text-align: center }"
-            ".listing {"
-              "margin-left: auto;"
-              "margin-right: auto;"
-              "width: 50%;"
-              "padding: 0.1em;"
-            "}"
-            "body { border: 0; padding: 0; margin: 0; background-color: #efefef;}"
-            "h1 {padding: 0.1em; padding-left:10px; padding-right:10px; background-color: #777; color: white; border-bottom: thin white dashed;}"
-        )
</del><span class="cx"> 
</span><del>-    def header(self, title):
-
-        if title is None or title == "":
-            title = "Calendar Server Web Administration"
-        else:
-            title = "Calendar Server Web Administration: " + title
-        
-        return ( "<html>\n"
-                 "<head>\n"
-                 "<h1>%(title)s</h1>\n" 
-                 "<title>%(title)s</title>\n"
-                 "<style>\n  %(style)s\n</style>\n"
-                 "</head>\n"
-                 "<body>\n"
-                 "<div style=\"padding-left:10px; padding-right:10px\">\n" % { "title": title, "style": self.directoryStyleSheet() })
-
-
-    def footer(self) :
-        return ( "\n</div>\n"
-                 "</body>\n"
-                 "</html>" )
-
-
</del><span class="cx">     @inlineCallbacks
</span><del>-    def htmlContent(self, request):
-
-        def queryValue(arg):
-            return request.args.get(arg, [""])[0]
-
-        # Read request parameters.
-        resourceId = queryValue("resourceId")
-        resourceSearch = queryValue("resourceSearch")
-        davPropertyName = queryValue("davPropertyName")
-        proxySearch = queryValue("proxySearch")
-
-        # Begin the content
-        content = (
-            "%(header)s\n"
-            "<h2>Resource Management</h2>\n"
-            "%(search)s\n" %
-            {
-                "header": self.header(None),
-                "search": (yield self.searchContent(self.directory,
-                                                    resourceSearch))
-            }
-        )
-
-        # Add details if a resource has been selected.
-        if resourceId:
-            principal = self.getResourceById(request, resourceId)
-            yield self.resourceActions(request, principal)
-            # Add the detailed content
-            content += (yield self.detailContent(
-                self.directory, request, principal, resourceId, davPropertyName,
-                proxySearch)
-            )
-
-        # Add the footer
-        content += self.footer()
-
-        returnValue(content)
-
-
-    @inlineCallbacks
</del><span class="cx">     def resourceActions(self, request, principal):
</span><span class="cx">         """
</span><span class="cx">         Take all actions on the given principal based on the given request.
</span><span class="lines">@@ -640,251 +560,15 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><del>-    def searchContent(self, directory, resourceSearch):
-        
-        formHtml = ("""
-<form id=\"frm_resource\" name=\"resourceForm\" action=\"/admin/\">
-  Search for resource to manage:
-  <input type=\"text\" id=\"txt_resourceSearch\" name=\"resourceSearch\" value=\"%s\" size=\"40\" />
-  <input type=\"submit\" value=\"Search\" />
-</form>
-""" % resourceSearch)
-
-        # Perform the search if a parameter was specified.
-        resultHtml = ""
-        if resourceSearch is not None and resourceSearch != "":
-
-            records = (yield self.search(resourceSearch))
-            if records:
-                records.sort(key=operator.attrgetter('fullName'))
-                resultHtml = """
-<table cellspacing=\"0\" cellpadding=\"3\" border=\"1\" style=\"margin-top:2px\">
-  <tr class=\"odd\">
-    <th>ID</th>
-    <th>Full Name</th>
-    <th>Type</th>
-    <th>Short Names</th>
-    <th>Auth IDs</th>
-    <th>Email Addresses</th>
-  </tr>""" % { "resourceSearch": resourceSearch }
-
-                for _i in range(0, len(records)):
-                    resultHtml += """
-  <tr class=\"%(rowClass)s\">
-    <td><a href=\"/admin/?resourceId=%(type)s:%(shortName)s\">select</a></td>
-    <td>%(name)s</td>
-    <td>%(typeStr)s</td>
-    <td>%(shortNames)s</td>
-    <td>%(authIds)s</td>
-    <td>%(emails)s</td>
-  </tr>""" % { "rowClass": "even" if _i%2 == 0 else "odd",
-               "type": records[_i].recordType,
-               "shortName": records[_i].shortNames[0],
-               "name": records[_i].fullName,
-               "typeStr": { "users"     : "User",
-                         "groups"    : "Group",
-                         "locations" : "Place",
-                         "resources" : "Resource",
-                       }.get(records[_i].recordType),
-               "shortNames": str(", ".join(records[_i].shortNames),),
-               "authIds": str(", ".join(records[_i].authIDs),),
-               "emails": str(", ".join(records[_i].emailAddresses),)
-             }
-                resultHtml += "\n</table>"
-            else:
-                resultHtml += "<div style=\"margin-top:4px\">No matches found for resource <b>%(resourceSearch)s</b>.</div>\n" % { "resourceSearch": resourceSearch }
-
-        result = "%s%s" % (formHtml, resultHtml)
-        returnValue(result)
-
-    @inlineCallbacks
-    def detailContent(self, directory, request, resource, resourceId, davPropertyName, proxySearch):
-
-        ###
-        # Resource title
-        ###
-        headerHtml = """
-<div style=\"margin-top:15px; background-color: #777; border-bottom:1px #ffffff dotted\"></div>
-<div style=\"background-color: #777; padding-top:2px; border-bottom:1px #ffffff dotted\"></div>
-<h3>Resource Details: %(resourceTitle)s</h3>""" % { "resourceTitle": resource }
-
-        ###
-        # DAV properties
-        ###
-        propertyHtml = """
-<div style=\"margin-top:15px; border-bottom:1px #444444 dotted\"></div>
-<form id=\"frm_davProperty\" name=\"davPropertyForm\" action=\"/admin/\" style=\"margin-top:15px; margin-bottom:0; padding-bottom:0\">
-  Show a DAV property value:
-  <input type=\"hidden\" id=\"hdn_resourceId\" name=\"resourceId\" value=\"%(resourceId)s\" />
-  <input type=\"text\" id=\"txt_davPropertyName\" name=\"davPropertyName\" value=\"%(davPropertyName)s\" size=\"40\" />
-  <input type=\"submit\" value=\"Get Value\" />
-</form>
-""" % { "resourceId": resourceId,
-        "davPropertyName": davPropertyName if davPropertyName is not None and davPropertyName != "" else "DAV:#" }
-        
-        if davPropertyName:
-            try:
-                namespace, name = davPropertyName.split("#")
-            except Exception:
-                propertyHtml += "<div>Unable to parse property to read: <b>%s</b></div>" % davPropertyName
-            else:
-                result = (yield resource.readProperty((namespace, name), None))
-                propertyHtml += "<div style=\"margin-top:7px\">Value of property <b>%(name)s</b>:</div><pre style=\"margin-top:5px; padding-top:0\">%(value)s</pre>" % { 
-                    "name": davPropertyName, 
-                    "value": cgi.escape(result.toxml())
-                }
-
-        ###
-        # Auto-schedule
-        ###
-        autoScheduleHtml = ""
-        if resource.record.recordType != "users" and resource.record.recordType != "groups":
-            autoSchedule = resource.getAutoSchedule()
-            autoScheduleHtml = """
-<div style=\"margin-top:15px; border-bottom:1px #444444 dotted\"></div>
-<form id=\"frm_autoSchedule\" name=\"autoScheduleForm\" action=\"/admin/\" style=\"margin-top:15px\">
-  <input type=\"hidden\" id=\"hdn_resourceId\" name=\"resourceId\" value=\"%(resourceId)s\" />
-  <div style=\"margin-top:7px\">
-    Auto-Schedule
-    <select id=\"sel_autoSchedule\" name=\"autoSchedule\">
-      <option value=\"true\"%(trueSelected)s>Yes</option>
-      <option value=\"false\"%(falseSelected)s>No</option>
-    </select>
-    <input type=\"submit\" value=\"Change\" />
-  </div>
-</form>\n""" % { "resourceId": resourceId,
-               "trueSelected": " selected=\"selected\"" if autoSchedule else "",
-               "falseSelected": "" if autoSchedule else " selected=\"selected\"" }
-
-        ###
-        # Current proxies
-        ###
-        currentProxiesHtml = "\n<div style=\"margin-top:15px; border-bottom:1px #444444 dotted\"></div>"
-        
-        (readSubPrincipal, writeSubPrincipal) = (proxySubprincipal(resource, "read"), proxySubprincipal(resource, "write"))
-        if readSubPrincipal or writeSubPrincipal:
-            (readMembers, writeMembers) = ((yield readSubPrincipal.readProperty(davxml.GroupMemberSet, None)), (yield writeSubPrincipal.readProperty(davxml.GroupMemberSet, None)))
-
-            if readMembers.children or writeMembers.children:
-                currentProxiesHtml += """
-<form id=\"frm_proxies\" name=\"proxiesForm\" action=\"/admin/\" style=\"margin-top:15px\">
-  <input type=\"hidden\" id=\"hdn_resourceId\" name=\"resourceId\" value=\"%(resourceId)s\" />
-  <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\">
-    <tr class=\"odd\">
-      <th colspan=\"2\">Read-Only Proxies</th>
-      <th colspan=\"2\">Read-Write Proxies</th>
-    </tr>\n""" % { "resourceTitle": resource,
-                   "resourceId": resourceId }
-
-                for _i in range(0, max(len(readMembers.children), len(writeMembers.children))):
-                    currentProxiesHtml += "    <tr class=\"%(rowClass)s\">" % { "rowClass": "even" if _i%2 == 0 else "odd" }
-                    if (_i < len(readMembers.children)) :
-                        proxyResource = (yield self.getResourceById(request, str(readMembers.children[_i])))
-                        currentProxiesHtml += """
-      <td>%(proxy)s</td>
-      <td>
-        <input type=\"submit\" name=\"mkWriteProxy|%(type)s:%(shortName)s\" value=\"Make Read-Write\" />
-        <input type=\"submit\" name=\"rmProxy|%(type)s:%(shortName)s\" value=\"Remove Proxy\" />
-      </td>""" % { "proxy": proxyResource,
-                   "type": proxyResource.record.recordType,
-                   "shortName": proxyResource.record.shortNames[0]
-                 }
-                    else :
-                        currentProxiesHtml += "\n      <td colspan=\"2\"></td>"
-                    if (_i < len(writeMembers.children)) :
-                        proxyResource = (yield self.getResourceById(request, str(writeMembers.children[_i])))
-                        currentProxiesHtml += """
-      <td>%(proxy)s</td>
-      <td>
-        <input type=\"submit\" name=\"mkReadProxy|%(type)s:%(shortName)s\" value=\"Make Read-Only\" />
-        <input type=\"submit\" name=\"rmProxy|%(type)s:%(shortName)s\" value=\"Remove Proxy\" />
-      </td>""" % { "proxy": proxyResource,
-                   "type": proxyResource.record.recordType,
-                   "shortName": proxyResource.record.shortNames[0]
-                 }
-                    else :
-                        currentProxiesHtml += "\n      <td colspan=\"2\"></td>"
-                    currentProxiesHtml += "\n    </tr>\n"
-    
-                currentProxiesHtml += "  </table>\n</form>\n"
-            else:
-                currentProxiesHtml += "<div style=\"margin-top:15px\">This resource has no proxies.</div>\n"
-        else:
-            currentProxiesHtml += "<div style=\"margin-top:15px\">This resource has no proxies.</div>\n"
-
-        ###
-        # Search for new proxies
-        ###
-        proxySearchHtml = """
-<div style=\"margin-top:15px; border-bottom:1px #444444 dotted\"></div>
-<form id=\"frm_proxySearch\" name=\"proxySearchForm\" action=\"/admin/\" style=\"margin-top:15px; margin-bottom:0; padding-bottom:0\">
-  Search to add proxies:
-  <input type=\"hidden\" id=\"hdn_resourceId\" name=\"resourceId\" value=\"%(resourceId)s\" />
-  <input type=\"text\" id=\"txt_proxySearch\" name=\"proxySearch\" value=\"%(proxySearch)s\" size=\"40\" />
-  <input type=\"submit\" value=\"Search\" />
-</form>
-""" % { "resourceId": resourceId,
-        "proxySearch": proxySearch }
-
-        # Perform the search if a parameter was specified.
-        if proxySearch:
-            records = (yield self.search(proxySearch))
-            if records:
-                records.sort(key=operator.attrgetter('fullName'))
-
-                proxySearchHtml += """
-<form id=\"frm_proxyAdd\" name=\"proxyAddForm\" action=\"/admin/\" style=\"margin-top:2px; padding-top:0\">
-  <input type=\"hidden\" id=\"hdn_resourceId\" name=\"resourceId\" value=\"%(resourceId)s\" />
-  <table cellspacing=\"0\" cellpadding=\"3\" border=\"1\">
-    <tr class=\"odd\">
-      <th>Full Name</th>
-      <th>Type</th>
-      <th>Short Names</th>
-      <th>Email Addresses</th>
-      <th></th>
-    </tr>""" % { "resourceId": resourceId }
-
-                for _i in range(0, len(records)):
-                    proxySearchHtml += """
-    <tr class=\"%(rowClass)s\">
-      <td>%(name)s</td>
-      <td>%(typeStr)s</td>
-      <td>%(shortNames)s</td>
-      <td>%(emails)s</td>
-      <td>
-        <input type=\"submit\" name=\"mkReadProxy|%(type)s:%(shortName)s\" value=\"Make Read-Only Proxy\" />
-        <input type=\"submit\" name=\"mkWriteProxy|%(type)s:%(shortName)s\" value=\"Make Read-Write Proxy\" />
-      </td>
-    </tr>""" % { "rowClass": "even" if _i%2 == 0 else "odd",
-                 "type": records[_i].recordType,
-                 "shortName": records[_i].shortNames[0],
-                 "name": records[_i].fullName,
-                 "typeStr": { "users"     : "User",
-                           "groups"    : "Group",
-                           "locations" : "Place",
-                           "resources" : "Resource",
-                           }.get(records[_i].recordType),
-                 "shortNames": str(", ".join(records[_i].shortNames),),
-                 "emails": str(", ".join(records[_i].emailAddresses),)
-             }
-                proxySearchHtml += "\n  </table>\n</form>\n"
-            else:
-                proxySearchHtml += "<div style=\"margin-top:4px\">No matches found for proxy resource <b>%(proxySearch)s</b>.</div>\n" % { "proxySearch": proxySearch }
-        
-        ###
-        # Put it all together
-        ###
-        detailHtml = "%s%s%s%s%s" % (headerHtml, propertyHtml, autoScheduleHtml, currentProxiesHtml, proxySearchHtml)
-
-        returnValue(detailHtml)
-
-
-    @inlineCallbacks
-    def renderNew(self, request):
</del><ins>+    def render(self, request):
</ins><span class="cx">         """
</span><span class="cx">         Create a L{WebAdminPage} to render HTML content for this request, and
</span><span class="cx">         return a response.
</span><span class="cx">         """
</span><ins>+        resourceId = request.args.get('resourceId', [''])[0]
+        if resourceId:
+            principal = self.getResourceById(request, resourceId)
+            yield self.resourceActions(request, principal)
</ins><span class="cx">         htmlContent = yield flattenString(request, WebAdminPage(self))
</span><span class="cx">         response = Response()
</span><span class="cx">         response.stream = MemoryStream(htmlContent)
</span><span class="lines">@@ -897,36 +581,19 @@
</span><span class="cx">         returnValue(response)
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    def render(self, request):
-
-        # The response-generation will be deferred.
-        def _defer(htmlContent):
-            response = Response()
-            response.stream = MemoryStream(str(htmlContent))
-            for (header, value) in (
-                ("content-type", self.contentType()),
-                ("content-encoding", self.contentEncoding()),
-            ):
-                if value is not None:
-                    response.headers.setHeader(header, value)
-            return response
-
-        # Generate the HTML and return the response when it's ready.
-        htmlContent = self.htmlContent(request)
-        htmlContent.addCallback(_defer)
-        return htmlContent
-
</del><span class="cx">     def getResourceById(self, request, resourceId):
</span><span class="cx">         if resourceId.startswith("/"):
</span><span class="cx">             return request.locateResource(resourceId)
</span><span class="cx">         else:
</span><span class="cx">             return principalForPrincipalID(resourceId, directory=self.directory)
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     @inlineCallbacks
</span><span class="cx">     def search(self, searchStr):
</span><span class="cx">         fields = []
</span><del>-        for fieldName in ("fullName", "firstName", "lastName", "emailAddresses"):
</del><ins>+        for fieldName in ("fullName", "firstName", "lastName",
+                          "emailAddresses"):
</ins><span class="cx">             fields.append((fieldName, searchStr, True, "contains"))
</span><del>-        
</del><ins>+
</ins><span class="cx">         records = list((yield self.directory.recordsMatchingFields(fields)))
</span><span class="cx">         returnValue(records)
</span></span></pre></div>
<a id="CalendarServerbranchesusersglyphimipandadminhtmlcalendarserverwebadmintesttest_resourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py (7973 => 7974)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py    2011-08-12 04:53:59 UTC (rev 7973)
+++ CalendarServer/branches/users/glyph/imip-and-admin-html/calendarserver/webadmin/test/test_resource.py       2011-08-12 04:54:10 UTC (rev 7974)
</span><span class="lines">@@ -359,6 +359,24 @@
</span><span class="cx">                       ''.join(gatherTextNodes(document)))
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+    @inlineCallbacks
+    def test_noDavProperty(self):
+        """
+        When a DAV property is not found, an error will be displayed.
+        """
+        self.resource.getResourceById = partial(FakePrincipalResource, self)
+        document = yield self.renderPage(
+            dict(resourceId=["qux"],
+                 davPropertyName=["DAV:#blub"])
+        )
+        propertyName = document.getElementById('txt_davPropertyName')
+        self.assertEquals(propertyName.getAttribute("value"),
+                          "DAV:#blub")
+        propertyValue = "No such property: DAV:#blub"
+        self.assertIn(cgi.escape(propertyValue),
+                      gatherTextNodes(document))
+
+
</ins><span class="cx">     # Properties for being a fake directory service as far as the implementation
</span><span class="cx">     # of DirectoryRecord is concerned.
</span><span class="cx">     realmName = 'Fake'
</span><span class="lines">@@ -433,32 +451,3 @@
</span><span class="cx">         return self.autosched
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-
-class NewRenderingTests(RenderingTests):
-    """
-    Tests for new L{WebAdminPage} renderer.
-    """
-
-    @inlineCallbacks
-    def renderPage(self, args={}):
-        self.resource.render = self.resource.renderNew
-        returnValue((yield super(NewRenderingTests, self).renderPage(args)))
-
-
-    @inlineCallbacks
-    def test_noDavProperty(self):
-        """
-        When a DAV property is not found, an error will be displayed.
-        """
-        self.resource.getResourceById = partial(FakePrincipalResource, self)
-        document = yield self.renderPage(
-            dict(resourceId=["qux"],
-                 davPropertyName=["DAV:#blub"])
-        )
-        propertyName = document.getElementById('txt_davPropertyName')
-        self.assertEquals(propertyName.getAttribute("value"),
-                          "DAV:#blub")
-        propertyValue = "No such property: DAV:#blub"
-        self.assertIn(cgi.escape(propertyValue),
-                      gatherTextNodes(document))
-
</del></span></pre>
</div>
</div>

</body>
</html>