<!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>[13454] CalendarServer/trunk/twistedcaldav/test</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/13454">13454</a></dd>
<dt>Author</dt> <dd>sagen@apple.com</dd>
<dt>Date</dt> <dd>2014-05-07 11:22:18 -0700 (Wed, 07 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove HomeTestCase and AddressBookHomeTestCase, which are no longer being used.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunktwistedcaldavtesttest_calendarquerypy">CalendarServer/trunk/twistedcaldav/test/test_calendarquery.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavtestutilpy">CalendarServer/trunk/twistedcaldav/test/util.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunktwistedcaldavtesttest_calendarquerypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/test/test_calendarquery.py (13453 => 13454)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/test/test_calendarquery.py        2014-05-07 18:11:33 UTC (rev 13453)
+++ CalendarServer/trunk/twistedcaldav/test/test_calendarquery.py        2014-05-07 18:22:18 UTC (rev 13454)
</span><span class="lines">@@ -41,10 +41,10 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def addEventsDir(testCase, eventsDir, uri):
</span><span class="cx">     &quot;&quot;&quot;
</span><del>-    Add events to a L{HomeTestCase} from a directory.
</del><ins>+    Add events to a L{twistedcaldav.test.util.TestCase} from a directory.
</ins><span class="cx"> 
</span><span class="cx">     @param testCase: The test case to add events to.
</span><del>-    @type testCase: L{HomeTestCase}
</del><ins>+    @type testCase: L{twistedcaldav.test.util.TestCase}
</ins><span class="cx"> 
</span><span class="cx">     @param eventsDir: A directory full of events.
</span><span class="cx">     @type eventsDir: L{FilePath}
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavtestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/test/util.py (13453 => 13454)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/test/util.py        2014-05-07 18:11:33 UTC (rev 13453)
+++ CalendarServer/trunk/twistedcaldav/test/util.py        2014-05-07 18:22:18 UTC (rev 13454)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> from txdav.common.datastore.file import CommonDataStore
</span><span class="cx"> from txdav.common.datastore.test.util import deriveQuota, CommonCommonTests
</span><span class="cx"> from txdav.who.util import directoryFromConfig
</span><del>-from txdav.xml import element as davxml, element
</del><ins>+from txdav.xml import element as element
</ins><span class="cx"> from txweb2.dav.test.util import SimpleRequest
</span><span class="cx"> import txweb2.dav.test.util
</span><span class="cx"> from txweb2.http import HTTPError, StatusResponse
</span><span class="lines">@@ -432,162 +432,6 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-class HomeTestCase(TestCase):
-    &quot;&quot;&quot;
-    Utility class for tests which wish to interact with a calendar home rather
-    than a top-level resource hierarchy.
-    &quot;&quot;&quot;
-
-    def createDataStore(self):
-        # FIXME: AddressBookHomeTestCase needs the same treatment.
-        fp = FilePath(self.mktemp())
-        fp.createDirectory()
-        return CommonDataStore(fp, None, None, True, False)
-
-
-    def setUp(self):
-        &quot;&quot;&quot;
-        Replace self.site.resource with an appropriately provisioned
-        L{CalendarHomeResource}, and, if the data store backing this test is a
-        file store, replace C{self.docroot} with a path pointing at the path
-        that stores the data for that L{CalendarHomeResource}.
-        &quot;&quot;&quot;
-        super(HomeTestCase, self).setUp()
-
-
-        @self.directoryFixture.whenDirectoryServiceChanges
-        def addHomeProvisioner(ds):
-            self.homeProvisioner = DirectoryCalendarHomeProvisioningResource(
-                ds, &quot;/calendars/&quot;, self.createDataStore()
-            )
-
-        def _defer(user):
-            # Commit the transaction
-            self.addCleanup(self.noRenderCommit)
-            # FIXME: nothing should use docroot any more.
-            aPath = getattr(user._newStoreHome, &quot;_path&quot;, None)
-            if aPath is not None:
-                self.docroot = aPath.path
-
-        return self._refreshRoot().addCallback(_defer)
-
-    committed = True
-
-    def noRenderCommit(self):
-        &quot;&quot;&quot;
-        A resource was retrieved but will not be rendered, so commit.
-        &quot;&quot;&quot;
-        if not self.committed:
-            self.committed = True
-            return self.site.resource._associatedTransaction.commit()
-
-
-    @inlineCallbacks
-    def _refreshRoot(self, request=None):
-        &quot;&quot;&quot;
-        Refresh the user resource positioned at the root of this site, to give
-        it a new transaction.
-        &quot;&quot;&quot;
-        yield self.noRenderCommit()
-        if request is None:
-            request = norequest()
-        users = yield self.homeProvisioner.getChild(&quot;users&quot;)
-
-        user, ignored = (yield users.locateChild(request, [&quot;wsanchez&quot;]))
-
-        # Force the request to succeed regardless of the implementation of
-        # accessControlList.
-        user.accessControlList = lambda request, *a, **k: succeed(
-            self.grantInherit(davxml.All())
-        )
-
-        # Fix the site to point directly at the user's calendar home so that we
-        # can focus on testing just that rather than hierarchy traversal..
-        self.site.resource = user
-        self.committed = False
-        returnValue(user)
-
-
-    @inlineCallbacks
-    def send(self, request, callback=None):
-        &quot;&quot;&quot;
-        Override C{send} in order to refresh the 'user' resource each time, to
-        get a new transaction to associate with the calendar home.
-        &quot;&quot;&quot;
-        yield self.noRenderCommit()
-        yield self._refreshRoot(request)
-        result = (yield super(HomeTestCase, self).send(request))
-        self.committed = True
-        yield self._refreshRoot()
-        if callback is not None:
-            result = yield callback(result)
-        returnValue(result)
-
-
-
-class AddressBookHomeTestCase(TestCase):
-    &quot;&quot;&quot;
-    Utility class for tests which wish to interact with a addressbook home rather
-    than a top-level resource hierarchy.
-    &quot;&quot;&quot;
-
-    def setUp(self):
-        &quot;&quot;&quot;
-        Replace self.site.resource with an appropriately provisioned
-        AddressBookHomeFile, and replace self.docroot with a path pointing at that
-        file.
-        &quot;&quot;&quot;
-        super(AddressBookHomeTestCase, self).setUp()
-
-
-        @self.directoryFixture.whenDirectoryServiceChanges
-        def addHomeProvisioner(ds):
-            self.homeProvisioner = DirectoryAddressBookHomeProvisioningResource(
-                ds, &quot;/calendars/&quot;, self.createDataStore()
-            )
-
-        @inlineCallbacks
-        def _defer(user):
-            # Commit the transaction
-            yield self.site.resource._associatedTransaction.commit()
-            self.docroot = user._newStoreHome._path.path
-
-        return self._refreshRoot().addCallback(_defer)
-
-
-    @inlineCallbacks
-    def _refreshRoot(self):
-        &quot;&quot;&quot;
-        Refresh the user resource positioned at the root of this site, to give
-        it a new transaction.
-        &quot;&quot;&quot;
-        users = self.homeProvisioner.getChild(&quot;users&quot;)
-        user, ignored = (yield users.locateChild(norequest(), [&quot;wsanchez&quot;]))
-
-        # Force the request to succeed regardless of the implementation of
-        # accessControlList.
-        user.accessControlList = lambda request, *a, **k: succeed(
-            self.grantInherit(davxml.All())
-        )
-
-        # Fix the site to point directly at the user's calendar home so that we
-        # can focus on testing just that rather than hierarchy traversal..
-        self.site.resource = user
-        returnValue(user)
-
-
-    @inlineCallbacks
-    def send(self, request, callback=None):
-        &quot;&quot;&quot;
-        Override C{send} in order to refresh the 'user' resource each time, to
-        get a new transaction to associate with the calendar home.
-        &quot;&quot;&quot;
-        yield self._refreshRoot()
-        result = (yield super(AddressBookHomeTestCase, self).send(request, callback))
-        returnValue(result)
-
-
-
</del><span class="cx"> class InMemoryPropertyStore(object):
</span><span class="cx">     def __init__(self):
</span><span class="cx">         class _FauxPath(object):
</span></span></pre>
</div>
</div>

</body>
</html>