<!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>[13468] CalendarServer/trunk</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/13468">13468</a></dd>
<dt>Author</dt> <dd>sagen@apple.com</dd>
<dt>Date</dt> <dd>2014-05-09 16:38:16 -0700 (Fri, 09 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Refactor the way unit tests create stores and directories; unit test directory records now come from txdav/common/datastore/test/accounts/*xml; also ServersDB is not a global, but instead lives in the directory service.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunkcalendarservertapcaldavpy">CalendarServer/trunk/calendarserver/tap/caldav.py</a></li>
<li><a href="#CalendarServertrunkcalendarservertoolstesttest_gatewaypy">CalendarServer/trunk/calendarserver/tools/test/test_gateway.py</a></li>
<li><a href="#CalendarServertrunkcalendarservertoolstesttest_resourcespy">CalendarServer/trunk/calendarserver/tools/test/test_resources.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavstdconfigpy">CalendarServer/trunk/twistedcaldav/stdconfig.py</a></li>
<li><a href="#CalendarServertrunktwistedcaldavtestutilpy">CalendarServer/trunk/twistedcaldav/test/util.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingcaldavtesttest_schedulerpy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/caldav/test/test_scheduler.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingimiptesttest_inboundpy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingischedulelocalserverspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingischeduleschedulerpy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/scheduler.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingischeduletesttest_localserverspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_localservers.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingischeduletesttest_resourcepy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_resource.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_cuaddresspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_cuaddress.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_freebusypy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_freebusy.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_implicitpy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_implicit.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_utilspy">CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_utils.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_attachmentspy">CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_filepy">CalendarServer/trunk/txdav/caldav/datastore/test/test_file.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_implicitpy">CalendarServer/trunk/txdav/caldav/datastore/test/test_implicit.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_sqlpy">CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_sql_sharingpy">CalendarServer/trunk/txdav/caldav/datastore/test/test_sql_sharing.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretesttest_utilpy">CalendarServer/trunk/txdav/caldav/datastore/test/test_util.py</a></li>
<li><a href="#CalendarServertrunktxdavcaldavdatastoretestutilpy">CalendarServer/trunk/txdav/caldav/datastore/test/util.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoretestcommonpy">CalendarServer/trunk/txdav/carddav/datastore/test/common.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoretesttest_filepy">CalendarServer/trunk/txdav/carddav/datastore/test/test_file.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoretesttest_sqlpy">CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcarddavdatastoretesttest_sql_sharingpy">CalendarServer/trunk/txdav/carddav/datastore/test/test_sql_sharing.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingresourcepy">CalendarServer/trunk/txdav/common/datastore/podding/resource.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingtesttest_conduitpy">CalendarServer/trunk/txdav/common/datastore/podding/test/test_conduit.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingtesttest_external_homepy">CalendarServer/trunk/txdav/common/datastore/podding/test/test_external_home.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingtesttest_resourcepy">CalendarServer/trunk/txdav/common/datastore/podding/test/test_resource.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastorepoddingtestutilpy">CalendarServer/trunk/txdav/common/datastore/podding/test/util.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretesttest_sqlpy">CalendarServer/trunk/txdav/common/datastore/test/test_sql.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestutilpy">CalendarServer/trunk/txdav/common/datastore/test/util.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoreupgradetesttest_migratepy">CalendarServer/trunk/txdav/common/datastore/upgrade/test/test_migrate.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoreworktesttest_inbox_cleanuppy">CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoreworktesttest_revision_cleanuppy">CalendarServer/trunk/txdav/common/datastore/work/test/test_revision_cleanup.py</a></li>
<li><a href="#CalendarServertrunktxdavdpstesttest_clientpy">CalendarServer/trunk/txdav/dps/test/test_client.py</a></li>
<li><a href="#CalendarServertrunktxdavwhodirectorypy">CalendarServer/trunk/txdav/who/directory.py</a></li>
<li><a href="#CalendarServertrunktxdavwhotesttest_group_attendeespy">CalendarServer/trunk/txdav/who/test/test_group_attendees.py</a></li>
<li><a href="#CalendarServertrunktxdavwhotesttest_utilpy">CalendarServer/trunk/txdav/who/test/test_util.py</a></li>
<li><a href="#CalendarServertrunktxdavwhoutilpy">CalendarServer/trunk/txdav/who/util.py</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>CalendarServer/trunk/txdav/common/datastore/test/accounts/</li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestaccountsaccountsxml">CalendarServer/trunk/txdav/common/datastore/test/accounts/accounts.xml</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestaccountsaugmentsxml">CalendarServer/trunk/txdav/common/datastore/test/accounts/augments.xml</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestaccountsgenerate_test_accountspy">CalendarServer/trunk/txdav/common/datastore/test/accounts/generate_test_accounts.py</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestaccountsproxiesxml">CalendarServer/trunk/txdav/common/datastore/test/accounts/proxies.xml</a></li>
<li><a href="#CalendarServertrunktxdavcommondatastoretestaccountsresourcesxml">CalendarServer/trunk/txdav/common/datastore/test/accounts/resources.xml</a></li>
<li><a href="#CalendarServertrunktxdavwhotestsupportpy">CalendarServer/trunk/txdav/who/test/support.py</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#CalendarServertrunktwistedcaldavdirectorytestaccountsxml">CalendarServer/trunk/twistedcaldav/directory/test/accounts.xml</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorytestaugmentsxml">CalendarServer/trunk/twistedcaldav/directory/test/augments.xml</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorytestproxiesxml">CalendarServer/trunk/twistedcaldav/directory/test/proxies.xml</a></li>
<li><a href="#CalendarServertrunktwistedcaldavdirectorytestresourcesxml">CalendarServer/trunk/twistedcaldav/directory/test/resources.xml</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunkcalendarservertapcaldavpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tap/caldav.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tap/caldav.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -79,6 +79,9 @@
</span><span class="cx">
</span><span class="cx"> from txdav.caldav.datastore.scheduling.imip.inbound import MailRetriever
</span><span class="cx"> from txdav.caldav.datastore.scheduling.imip.inbound import scheduleNextMailPoll
</span><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import (
+ buildServersDB
+)
</ins><span class="cx"> from txdav.common.datastore.upgrade.migrate import UpgradeToDatabaseStep
</span><span class="cx"> from txdav.common.datastore.upgrade.sql.upgrade import (
</span><span class="cx"> UpgradeDatabaseCalendarDataStep, UpgradeDatabaseOtherStep,
</span><span class="lines">@@ -126,7 +129,6 @@
</span><span class="cx"> )
</span><span class="cx"> from twisted.application.strports import service as strPortsService
</span><span class="cx"> from txdav.dps.server import DirectoryProxyAMPFactory
</span><del>-
</del><span class="cx"> try:
</span><span class="cx"> from calendarserver.version import version
</span><span class="cx"> except ImportError:
</span><span class="lines">@@ -870,6 +872,8 @@
</span><span class="cx"> """
</span><span class="cx"> pool, txnFactory = getDBPool(config)
</span><span class="cx"> directory = DirectoryProxyClientService(config.DirectoryRealmName)
</span><ins>+ if config.Servers.Enabled:
+ directory.setServersDB(buildServersDB(config.Servers.MaxClients))
</ins><span class="cx"> store = storeFromConfig(config, txnFactory, directory)
</span><span class="cx"> logObserver = AMPCommonAccessLoggingObserver()
</span><span class="cx"> result = self.requestProcessingService(options, store, logObserver)
</span><span class="lines">@@ -1478,7 +1482,15 @@
</span><span class="cx"> # FIXME: right now the store passed *to* the directory is the
</span><span class="cx"> # calendar/contacts data store, but for a multi-server deployment
</span><span class="cx"> # it will need its own separate store.
</span><del>- store.setDirectoryService(directoryFromConfig(config, store=store))
</del><ins>+ if config.Servers.Enabled:
+ serversDB = buildServersDB(config.Servers.MaxClients)
+ else:
+ serversDB = None
+ store.setDirectoryService(
+ directoryFromConfig(
+ config, store=store, serversDB=serversDB
+ )
+ )
</ins><span class="cx">
</span><span class="cx"> pps = PreProcessingService(
</span><span class="cx"> createMainService, cp, store, logObserver, storageService
</span><span class="lines">@@ -1897,6 +1909,8 @@
</span><span class="cx"> directory = DirectoryProxyClientService(
</span><span class="cx"> config.DirectoryRealmName
</span><span class="cx"> )
</span><ins>+ if config.Servers.Enabled:
+ directory.setServersDB(buildServersDB(config.Servers.MaxClients))
</ins><span class="cx"> else:
</span><span class="cx"> # If the master is to act as the DPS server:
</span><span class="cx"> directory = None
</span></span></pre></div>
<a id="CalendarServertrunkcalendarservertoolstesttest_gatewaypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -17,26 +17,30 @@
</span><span class="cx">
</span><span class="cx"> import os
</span><span class="cx"> from plistlib import readPlistFromString
</span><ins>+import plistlib
</ins><span class="cx"> import xml
</span><span class="cx">
</span><span class="cx"> from twext.python.filepath import CachingFilePath as FilePath
</span><span class="cx"> from twisted.internet import reactor
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, Deferred, returnValue
</span><del>-
</del><ins>+from twisted.trial.unittest import TestCase
+from twistedcaldav import memcacher
</ins><span class="cx"> from twistedcaldav.config import config
</span><del>-from twistedcaldav.test.util import StoreTestCase, CapturingProcessProtocol
-import plistlib
</del><span class="cx"> from twistedcaldav.memcacheclient import ClientFactory
</span><del>-from twistedcaldav import memcacher
</del><ins>+from twistedcaldav.test.util import CapturingProcessProtocol
+from txdav.common.datastore.test.util import (
+ theStoreBuilder, StubNotifierFactory
+)
</ins><span class="cx"> from txdav.who.idirectory import AutoScheduleMode
</span><ins>+from txdav.who.util import directoryFromConfig
</ins><span class="cx">
</span><span class="cx">
</span><del>-class RunCommandTestCase(StoreTestCase):
</del><span class="cx">
</span><del>- def configure(self):
- """
- Override the standard StoreTestCase configuration
- """
</del><ins>+class RunCommandTestCase(TestCase):
+
+ @inlineCallbacks
+ def setUp(self):
+
</ins><span class="cx"> self.serverRoot = self.mktemp()
</span><span class="cx"> os.mkdir(self.serverRoot)
</span><span class="cx"> absoluteServerRoot = os.path.abspath(self.serverRoot)
</span><span class="lines">@@ -62,7 +66,6 @@
</span><span class="cx"> os.makedirs(runRoot)
</span><span class="cx">
</span><span class="cx"> config.reset()
</span><del>- self.configInit()
</del><span class="cx">
</span><span class="cx"> testRoot = os.path.join(os.path.dirname(__file__), "gateway")
</span><span class="cx"> templateName = os.path.join(testRoot, "caldavd.plist")
</span><span class="lines">@@ -134,11 +137,9 @@
</span><span class="cx"> copyAugmentFile = FilePath(os.path.join(config.DataRoot, "augments.xml"))
</span><span class="cx"> origAugmentFile.copyTo(copyAugmentFile)
</span><span class="cx">
</span><del>- # # Make sure trial puts the reactor in the right state, by letting it
- # # run one reactor iteration. (Ignore me, please.)
- # d = Deferred()
- # reactor.callLater(0, d.callback, True)
- # return d
</del><ins>+ self.notifierFactory = StubNotifierFactory()
+ self.store = yield theStoreBuilder.buildStore(self, self.notifierFactory)
+ self.directory = directoryFromConfig(config, self.store)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span></span></pre></div>
<a id="CalendarServertrunkcalendarservertoolstesttest_resourcespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/calendarserver/tools/test/test_resources.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/calendarserver/tools/test/test_resources.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/calendarserver/tools/test/test_resources.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks
</span><span class="cx"> from calendarserver.tools.resources import migrateResources
</span><span class="cx"> from twistedcaldav.test.util import StoreTestCase
</span><del>-from txdav.who.util import InMemoryDirectoryService
</del><ins>+from txdav.who.test.support import InMemoryDirectoryService
</ins><span class="cx"> from twext.who.directory import DirectoryRecord
</span><span class="cx"> from txdav.who.idirectory import RecordType as CalRecordType
</span><span class="cx"> from txdav.who.directory import CalendarDirectoryRecordMixin
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorytestaccountsxml"></a>
<div class="delfile"><h4>Deleted: CalendarServer/trunk/twistedcaldav/directory/test/accounts.xml (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/test/accounts.xml        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/twistedcaldav/directory/test/accounts.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -1,389 +0,0 @@
</span><del>-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-Copyright (c) 2006-2014 Apple Inc. All rights reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-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 "AS IS" 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.
- -->
-
-<!DOCTYPE accounts SYSTEM "../../../conf/auth/accounts.dtd">
-<directory realm="Test">
- <record type="user">
- <uid>D11F03A0-97EA-48AF-9A6C-FAC7F3975766</uid>
- <short-name>admin</short-name>
- <password>nimda</password>
- <full-name>Administrators</full-name>
- </record>
- <record type="user">
- <uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
- <guid>6423F94A-6B76-4A3A-815B-D52CFD77935D</guid>
- <short-name>wsanchez</short-name>
- <password>zehcnasw</password>
- <full-name>Wilfredo Sanchez</full-name>
- <email>wsanchez@example.com</email>
- </record>
- <record type="user">
- <uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
- <guid>5A985493-EE2C-4665-94CF-4DFEA3A89500</guid>
- <short-name>cdaboo</short-name>
- <password>oobadc</password>
- <full-name>Cyrus Daboo</full-name>
- <email>cdaboo@example.com</email>
- </record>
- <record type="user">
- <uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</uid>
- <short-name>lecroy</short-name>
- <password>yorcel</password>
- <full-name>Chris Lecroy</full-name>
- <email>lecroy@example.com</email>
- </record>
- <record type="user">
- <uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</uid>
- <short-name>dreid</short-name>
- <password>dierd</password>
- <full-name>David Reid</full-name>
- <email>dreid@example.com</email>
- </record>
- <record type="user">
- <uid>8E04787E-336D-41ED-A70B-D233AD0DCE6F</uid>
- <guid>8E04787E-336D-41ED-A70B-D233AD0DCE6F</guid>
- <short-name>doublequotes</short-name>
- <password>setouqelbuod</password>
- <full-name>Double "quotey" Quotes</full-name>
- <email>doublequotes@example.com</email>
- </record>
- <record type="user">
- <uid>37DB0C90-4DB1-4932-BC69-3DAB66F374F5</uid>
- <guid>37DB0C90-4DB1-4932-BC69-3DAB66F374F5</guid>
- <short-name>purgeuser</short-name>
- <password>purgeuser</password>
- <full-name>Purge User</full-name>
- <email>purgeuser@example.com</email>
- </record>
- <record type="user">
- <uid>home1</uid>
- <short-name>home1</short-name>
- <password>home1</password>
- <full-name>Home One</full-name>
- <email>home1@example.com</email>
- </record>
- <record type="user">
- <uid>home2</uid>
- <short-name>home2</short-name>
- <password>home2</password>
- <full-name>Home Two</full-name>
- <email>home2@example.com</email>
- </record>
-
- <record type="user">
- <uid>543D28BA-F74F-4D5F-9243-B3E3A61171E5</uid>
- <short-name>nocalendar</short-name>
- <password>radnelacon</password>
- <full-name>No Calendar</full-name>
- <email>nocalendar@example.com</email>
- </record>
- <record type="user">
- <uid>7423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
- <short-name>usera</short-name>
- <password>a</password>
- <full-name>a</full-name>
- <email>a@example.com</email>
- </record>
- <record type="user">
- <uid>8A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
- <short-name>userb</short-name>
- <password>b</password>
- <full-name>b</full-name>
- <email>b@example.com</email>
- </record>
- <record type="user">
- <uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD2</uid>
- <short-name>userc</short-name>
- <password>c</password>
- <full-name>c</full-name>
- <email>c@example.com</email>
- </record>
- <record type="user">
- <uid>9E1FFAC4-3CCD-45A1-8272-D161C92D2EEE</uid>
- <short-name>usercalonly</short-name>
- <password>a</password>
- <full-name>a calonly</full-name>
- <email>a-calonly@example.com</email>
- </record>
- <record type="user">
- <uid>7678EC8A-A069-4E82-9066-7279C6718507</uid>
- <short-name>useradbkonly</short-name>
- <password>a</password>
- <full-name>a adbkonly</full-name>
- <email>a-adbkonly@example.com</email>
- </record>
- <record type="user">
- <uid>320B73A1-46E2-4180-9563-782DFDBE1F63</uid>
- <short-name>nonascii</short-name>
- <short-name>nonascii佐藤</short-name>
- <password>a</password>
- <full-name>佐藤佐藤佐藤</full-name>
- <email>nonascii@example.com</email>
- </record>
- <record type="user">
- <uid>FC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
- <short-name>delegator</short-name>
- <password>a</password>
- <full-name>Calendar Delegator</full-name>
- <email>calendardelegator@example.com</email>
- </record>
- <record type="user">
- <uid>EC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
- <short-name>occasionaldelegate</short-name>
- <password>a</password>
- <full-name>Occasional Delegate</full-name>
- <email>occasional@example.com</email>
- </record>
- <record type="user">
- <uid>46D9D716-CBEE-490F-907A-66FA6C3767FF</uid>
- <short-name>delegateviagroup</short-name>
- <password>a</password>
- <full-name>Delegate Via Group</full-name>
- <email>delegateviagroup@example.com</email>
- </record>
- <record type="group">
- <uid>00599DAF-3E75-42DD-9DB7-52617E79943F</uid>
- <short-name>delegategroup</short-name>
- <full-name>Delegate Group</full-name>
- <member-uid>46D9D716-CBEE-490F-907A-66FA6C3767FF</member-uid>
- </record>
-
- <record type="user">
- <uid>user01</uid>
- <short-name>user01</short-name>
- <password>user01</password>
- <full-name>User 01</full-name>
- <email>user01@example.com</email>
- </record>
-
- <record type="user">
- <uid>user02</uid>
- <short-name>user02</short-name>
- <password>user02</password>
- <full-name>User 02</full-name>
- <email>user02@example.com</email>
- </record>
-
- <record type="user">
- <uid>user03</uid>
- <short-name>user03</short-name>
- <password>user03</password>
- <full-name>User 03</full-name>
- <email>user03@example.com</email>
- </record>
-
- <record type="user">
- <uid>user04</uid>
- <short-name>user04</short-name>
- <password>user04</password>
- <full-name>User 04</full-name>
- <email>user04@example.com</email>
- </record>
-
- <record type="user">
- <uid>user05</uid>
- <short-name>user05</short-name>
- <password>user05</password>
- <full-name>User 05</full-name>
- <email>user05@example.com</email>
- </record>
-
- <record type="user">
- <uid>user06</uid>
- <short-name>user06</short-name>
- <password>user06</password>
- <full-name>User 06</full-name>
- <email>user06@example.com</email>
- </record>
-
- <record type="user">
- <uid>__wsanchez1__</uid>
- <short-name>wsanchez1</short-name>
- <short-name>wilfredo_sanchez</short-name>
- <password>zehcnasw</password>
- <full-name>Wilfredo Sanchez</full-name>
- <email>wsanchez@bitbucket.calendarserver.org</email>
- <email>wsanchez@devnull.twistedmatrix.com</email>
- </record>
-
- <record type="user">
- <uid>__glyph1__</uid>
- <short-name>glyph1</short-name>
- <password>hpylg</password>
- <full-name>Glyph Lefkowitz</full-name>
- <email>glyph@bitbucket.calendarserver.org</email>
- <email>glyph@devnull.twistedmatrix.com</email>
- </record>
-
- <record type="user">
- <uid>__sagen1__</uid>
- <short-name>sagen</short-name>
- <short-name>sagen1</short-name>
- <password>negas</password>
- <full-name>Morgen Sagen</full-name>
- <email>sagen@bitbucket.calendarserver.org</email>
- </record>
-
- <record type="user">
- <uid>__cdaboo1__</uid>
- <short-name>cdaboo1</short-name>
- <password>suryc</password>
- <full-name>Cyrus Daboo</full-name>
- <email>cdaboo@bitbucket.calendarserver.org</email>
- </record>
-
- <record type="user">
- <uid>__dre1__</uid>
- <short-name>dre1</short-name>
- <short-name>dre</short-name>
- <password>erd</password>
- <full-name>Andre LaBranche</full-name>
- <email>dre@bitbucket.calendarserver.org</email>
- </record>
-
- <record type="group">
- <uid>__top_group_1__</uid>
- <short-name>top-group-1</short-name>
- <full-name>Top Group 1</full-name>
- <email>topgroup1@example.com</email>
- <member-uid>__wsanchez1__</member-uid>
- <member-uid>__glyph1__</member-uid>
- <member-uid>__sub_group_1__</member-uid>
- </record>
-
- <record type="group">
- <uid>__sub_group_1__</uid>
- <short-name>sub-group-1</short-name>
- <full-name>Sub Group 1</full-name>
- <email>subgroup1@example.com</email>
- <member-uid>__sagen1__</member-uid>
- <member-uid>__cdaboo1__</member-uid>
- </record>
-
-
- <record type="group">
- <uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</uid>
- <short-name>managers</short-name>
- <password>managers</password>
- <full-name>Managers</full-name>
- <member-uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</member-uid>
- </record>
- <record type="group">
- <uid>admin</uid>
- <short-name>admin</short-name>
- <password>admin</password>
- <full-name>Administrators</full-name>
- <member-uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</member-uid>
- </record>
- <record type="group">
- <uid>grunts</uid>
- <short-name>grunts</short-name>
- <password>grunts</password>
- <full-name>We do all the work</full-name>
- <member-uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</member-uid>
- <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
- <member-uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</member-uid>
- </record>
- <record type="group">
- <uid>right_coast</uid>
- <short-name>right_coast</short-name>
- <password>right_coast</password>
- <full-name>East Coast</full-name>
- <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
- </record>
- <record type="group">
- <uid>left_coast</uid>
- <short-name>left_coast</short-name>
- <password>left_coast</password>
- <full-name>West Coast</full-name>
- <member-uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</member-uid>
- <member-uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</member-uid>
- <member-uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</member-uid>
- </record>
- <record type="group">
- <uid>both_coasts</uid>
- <short-name>both_coasts</short-name>
- <password>both_coasts</password>
- <full-name>Both Coasts</full-name>
- <member-uid>right_coast</member-uid>
- <member-uid>left_coast</member-uid>
- </record>
- <record type="group">
- <uid>recursive1_coasts</uid>
- <short-name>recursive1_coasts</short-name>
- <password>recursive1_coasts</password>
- <full-name>Recursive1 Coasts</full-name>
- <member-uid>recursive2_coasts</member-uid>
- <member-uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</member-uid>
- </record>
- <record type="group">
- <uid>recursive2_coasts</uid>
- <short-name>recursive2_coasts</short-name>
- <password>recursive2_coasts</password>
- <full-name>Recursive2 Coasts</full-name>
- <member-uid>recursive1_coasts</member-uid>
- <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
- </record>
- <record type="group">
- <uid>non_calendar_group</uid>
- <short-name>non_calendar_group</short-name>
- <password>non_calendar_group</password>
- <full-name>Non-calendar group</full-name>
- <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
- <member-uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</member-uid>
- </record>
-
- <!-- Calverify test records -->
-
- <record type="user">
- <uid>D46F3D71-04B7-43C2-A7B6-6F92F92E61D0</uid>
- <guid>D46F3D71-04B7-43C2-A7B6-6F92F92E61D0</guid>
- <short-name>example1</short-name>
- <password>example</password>
- <full-name>Example User1</full-name>
- <email>example1@example.com</email>
- </record>
-
- <record type="user">
- <uid>47B16BB4-DB5F-4BF6-85FE-A7DA54230F92</uid>
- <guid>47B16BB4-DB5F-4BF6-85FE-A7DA54230F92</guid>
- <short-name>example2</short-name>
- <password>example</password>
- <full-name>Example User2</full-name>
- <email>example2@example.com</email>
- </record>
-
- <record type="user">
- <uid>AC478592-7783-44D1-B2AE-52359B4E8415</uid>
- <guid>AC478592-7783-44D1-B2AE-52359B4E8415</guid>
- <short-name>example3</short-name>
- <password>example</password>
- <full-name>Example User3</full-name>
- <email>example3@example.com</email>
- </record>
-
- <record type="user">
- <uid>A89E3A97-1658-4E45-A185-479F3E49D446</uid>
- <guid>A89E3A97-1658-4E45-A185-479F3E49D446</guid>
- <short-name>example4</short-name>
- <password>example</password>
- <full-name>Example User4</full-name>
- <email>example4@example.com</email>
- </record>
-
-</directory>
</del></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorytestaugmentsxml"></a>
<div class="delfile"><h4>Deleted: CalendarServer/trunk/twistedcaldav/directory/test/augments.xml (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/test/augments.xml        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/twistedcaldav/directory/test/augments.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -1,187 +0,0 @@
</span><del>-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-Copyright (c) 2009-2014 Apple Inc. All rights reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-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 "AS IS" 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.
- -->
-
-<!DOCTYPE augments SYSTEM "../../../conf/auth/augments.dtd">
-
-<augments>
- <!--
- <record>
- <uid>Location-Default</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- <auto-schedule-mode>automatic</auto-schedule-mode>
- </record>
- <record>
- <uid>Resource-Default</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- <auto-schedule-mode>automatic</auto-schedule-mode>
- </record>
- -->
-
- <record>
- <uid>D11F03A0-97EA-48AF-9A6C-FAC7F3975766</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
- <server-id>00001</server-id>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
- <server-id>00002</server-id>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>543D28BA-F74F-4D5F-9243-B3E3A61171E5</uid>
- <enable-calendar>false</enable-calendar>
- <enable-addressbook>false</enable-addressbook>
- </record>
- <record>
- <uid>user01</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>user02</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>user03</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>user04</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>user05</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>user06</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>right_coast</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>left_coast</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>mercury</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>gemini</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>apollo</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- <auto-accept-group>both_coasts</auto-accept-group>
- </record>
- <record>
- <uid>orion</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>transporter</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>ftlcpu</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <!--
- <record>
- <uid>non_calendar_proxy</uid>
- <enable-calendar>true</enable-calendar>
- <enable-addressbook>true</enable-addressbook>
- </record>
--->
- <record>
- <uid>7423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
- <enable-calendar>true</enable-calendar>
- </record>
- <record>
- <uid>8A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
- <enable-calendar>true</enable-calendar>
- </record>
- <record>
- <uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD2</uid>
- <enable-calendar>true</enable-calendar>
- </record>
- <record>
- <uid>9E1FFAC4-3CCD-45A1-8272-D161C92D2EEE</uid>
- <enable-calendar>true</enable-calendar>
- </record>
- <record>
- <uid>7678EC8A-A069-4E82-9066-7279C6718507</uid>
- <enable-addressbook>true</enable-addressbook>
- </record>
- <record>
- <uid>FC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
- <enable-calendar>true</enable-calendar>
- </record>
- <record>
- <uid>EC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
- <enable-calendar>true</enable-calendar>
- <enable-login>true</enable-login>
- </record>
- <record>
- <uid>00599DAF-3E75-42DD-9DB7-52617E79943F</uid>
- <enable-calendar>false</enable-calendar>
- <enable-login>false</enable-login>
- </record>
- <record>
- <uid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</uid>
- <enable-calendar>true</enable-calendar>
- <auto-schedule-mode>automatic</auto-schedule-mode>
- </record>
-
-</augments>
</del></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorytestproxiesxml"></a>
<div class="delfile"><h4>Deleted: CalendarServer/trunk/twistedcaldav/directory/test/proxies.xml (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/test/proxies.xml        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/twistedcaldav/directory/test/proxies.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-Copyright (c) 2006-2014 Apple Inc. All rights reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-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 "AS IS" 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.
- -->
-
-<!DOCTYPE proxies SYSTEM "../../../conf/auth/proxies.dtd">
-
-<proxies>
- <record>
- <guid>mercury</guid>
- <write-proxies>
- <member>left_coast</member>
- </write-proxies>
- </record>
- <record>
- <guid>gemini</guid>
- <write-proxies>
- <member>6423F94A-6B76-4A3A-815B-D52CFD77935D</member>
- </write-proxies>
- </record>
- <record>
- <guid>apollo</guid>
- <write-proxies>
- <member>both_coasts</member>
- </write-proxies>
- </record>
- <record>
- <guid>orion</guid>
- <write-proxies>
- <member>recursive1_coasts</member>
- </write-proxies>
- </record>
- <record>
- <guid>non_calendar_proxy</guid>
- <write-proxies>
- <member>non_calendar_group</member>
- </write-proxies>
- <read-proxies>
- <member>recursive2_coasts</member>
- </read-proxies>
- </record>
- <record>
- <guid>7423F94A-6B76-4A3A-815B-D52CFD77935D</guid>
- <write-proxies>
- <member>8A985493-EE2C-4665-94CF-4DFEA3A89500</member>
- <member>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD2</member>
- </write-proxies>
- </record>
- <record>
- <guid>FC465590-E9E9-4746-ACE8-6C756A49FE4D</guid>
- <write-proxies>
- <member>EC465590-E9E9-4746-ACE8-6C756A49FE4D</member>
- <member>00599DAF-3E75-42DD-9DB7-52617E79943F</member>
- </write-proxies>
- </record>
-</proxies>
</del></span></pre></div>
<a id="CalendarServertrunktwistedcaldavdirectorytestresourcesxml"></a>
<div class="delfile"><h4>Deleted: CalendarServer/trunk/twistedcaldav/directory/test/resources.xml (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/test/resources.xml        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/twistedcaldav/directory/test/resources.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -1,120 +0,0 @@
</span><del>-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-Copyright (c) 2006-2014 Apple Inc. All rights reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-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 "AS IS" 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.
- -->
-
-<!DOCTYPE accounts SYSTEM "../../../conf/auth/accounts.dtd">
-
-<directory realm="Test">
- <record type="location">
- <uid>mercury</uid>
- <short-name>mercury</short-name>
- <password>mercury</password>
- <full-name>Mercury Seven</full-name>
- <email>mercury@example.com</email>
- </record>
- <record type="location">
- <uid>gemini</uid>
- <short-name>gemini</short-name>
- <password>gemini</password>
- <full-name>Gemini Twelve</full-name>
- <email>gemini@example.com</email>
- </record>
- <record type="location">
- <uid>apollo</uid>
- <short-name>apollo</short-name>
- <password>apollo</password>
- <full-name>Apollo Eleven</full-name>
- <email>apollo@example.com</email>
- </record>
- <record type="location">
- <uid>orion</uid>
- <short-name>orion</short-name>
- <password>orion</password>
- <full-name>Orion</full-name>
- <email>orion@example.com</email>
- </record>
- <record type="resource">
- <uid>transporter</uid>
- <short-name>transporter</short-name>
- <password>transporter</password>
- <full-name>Mass Transporter</full-name>
- <email>transporter@example.com</email>
- </record>
- <record type="resource">
- <uid>ftlcpu</uid>
- <short-name>ftlcpu</short-name>
- <password>ftlcpu</password>
- <full-name>Faster-Than-Light Microprocessor</full-name>
- <email>ftlcpu@example.com</email>
- </record>
- <record type="resource">
- <uid>non_calendar_proxy</uid>
- <short-name>non_calendar_proxy</short-name>
- <password>non_calendar_proxy</password>
- <full-name>Non-calendar proxy</full-name>
- <email>non_calendar_proxy@example.com</email>
- </record>
- <record type="resource">
- <uid>disabled</uid>
- <short-name>disabled</short-name>
- <password>disabled</password>
- <full-name>Disabled Record</full-name>
- <email>disabled@example.com</email>
- </record>
- <record type="location">
- <uid>__sanchezoffice__</uid>
- <short-name>sanchezoffice</short-name>
- <full-name>Sanchez Office</full-name>
- </record>
- <record type="location">
- <uid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</uid>
- <guid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</guid>
- <short-name>location01</short-name>
- <password>location01</password>
- <full-name>Room 01</full-name>
- </record>
- <record type="location">
- <uid>room-addr-1</uid>
- <guid>634A102B-6902-464F-9451-8A86A31628C1</guid>
- <short-name>room-with-address-1</short-name>
- <password>room-addr-2</password>
- <full-name>Room with Address 1</full-name>
- <associated-address>1-infinite-loop</associated-address>
- </record>
- <record type="location">
- <uid>room-addr-2</uid>
- <short-name>room-with-address-2</short-name>
- <password>room-addr-2</password>
- <full-name>Room with Address 2</full-name>
- <associated-address>2-infinite-loop</associated-address>
- </record>
- <record type="address">
- <uid>1-infinite-loop</uid>
- <short-name>il1</short-name>
- <full-name>One Infinite Loop</full-name>
- <street-address>1 Infinite Loop, Cupertino, CA 95014</street-address>
- <geographic-location>37.331741,-122.030333</geographic-location>
- </record>
- <record type="address">
- <uid>2-infinite-loop</uid>
- <short-name>il2</short-name>
- <full-name>Two Infinite Loop</full-name>
- <street-address>2 Infinite Loop, Cupertino, CA 95014</street-address>
- <geographic-location>37.332633,-122.030502</geographic-location>
- </record>
-
-</directory>
</del></span></pre></div>
<a id="CalendarServertrunktwistedcaldavstdconfigpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/stdconfig.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -1651,18 +1651,6 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-def _updateServers(configDict, reloading=False):
- from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers
- if configDict.Servers.Enabled:
- Servers.load()
- Servers.installReverseProxies(
- configDict.Servers.MaxClients,
- )
- else:
- Servers.clear()
-
-
-
</del><span class="cx"> def _updateCompliance(configDict, reloading=False):
</span><span class="cx">
</span><span class="cx"> if configDict.EnableCalDAV:
</span><span class="lines">@@ -1730,7 +1718,7 @@
</span><span class="cx"> _updateICalendar,
</span><span class="cx"> _updateScheduling,
</span><span class="cx"> _updateSharing,
</span><del>- _updateServers,
</del><ins>+ # _updateServers,
</ins><span class="cx"> _updateCompliance,
</span><span class="cx"> )
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktwistedcaldavtestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/test/util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/test/util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/twistedcaldav/test/util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -35,10 +35,8 @@
</span><span class="cx"> from twistedcaldav.directory.util import transactionFromRequest
</span><span class="cx"> from twistedcaldav.memcacheclient import ClientFactory
</span><span class="cx"> from twistedcaldav.stdconfig import config
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.file import CommonDataStore
</span><span class="cx"> from txdav.common.datastore.test.util import deriveQuota, CommonCommonTests
</span><del>-from txdav.who.util import directoryFromConfig
</del><span class="cx"> from txdav.xml import element as element
</span><span class="cx"> from txweb2.dav.test.util import SimpleRequest
</span><span class="cx"> import txweb2.dav.test.util
</span><span class="lines">@@ -110,22 +108,17 @@
</span><span class="cx">
</span><span class="cx"> class StoreTestCase(CommonCommonTests, txweb2.dav.test.util.TestCase):
</span><span class="cx"> """
</span><del>- A base class for tests that use the SQL store.
</del><ins>+ A base class for tests that use the SQL store and need to create and
+ verify filesystem hierarchies.
</ins><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(StoreTestCase, self).setUp()
</span><span class="cx">
</span><del>- self.configure()
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx">
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(
- self, self.notifierFactory, None
- )
- self.directory = directoryFromConfig(config, self._sqlCalendarStore)
- self._sqlCalendarStore.setDirectoryService(self.directory)
-
- self.rootResource = getRootResource(config, self._sqlCalendarStore)
</del><ins>+ self.rootResource = getRootResource(config, self.store)
</ins><span class="cx"> self.actualRoot = self.rootResource.resource.resource
</span><span class="cx"> self.site = Site(self.actualRoot)
</span><span class="cx">
</span><span class="lines">@@ -136,37 +129,12 @@
</span><span class="cx"> return succeed(None)
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> def configure(self):
</span><span class="cx"> """
</span><span class="cx"> Adjust the global configuration for this test.
</span><span class="cx"> """
</span><del>- self.serverRoot = self.mktemp()
- os.mkdir(self.serverRoot)
</del><ins>+ super(StoreTestCase, self).configure()
</ins><span class="cx">
</span><del>- config.reset()
- self.configInit()
-
- config.ServerRoot = os.path.abspath(self.serverRoot)
- config.ConfigRoot = "config"
- config.LogRoot = "logs"
- config.RunRoot = "logs"
-
- if not os.path.exists(config.DataRoot):
- os.makedirs(config.DataRoot)
- if not os.path.exists(config.DocumentRoot):
- os.makedirs(config.DocumentRoot)
- if not os.path.exists(config.ConfigRoot):
- os.makedirs(config.ConfigRoot)
- if not os.path.exists(config.LogRoot):
- os.makedirs(config.LogRoot)
-
</del><span class="cx"> config.Memcached.Pools.Default.ClientEnabled = False
</span><span class="cx"> config.Memcached.Pools.Default.ServerEnabled = False
</span><span class="cx"> ClientFactory.allowTestCache = True
</span><span class="lines">@@ -175,19 +143,7 @@
</span><span class="cx"> config.DirectoryAddressBook.Enabled = False
</span><span class="cx"> config.UsePackageTimezones = True
</span><span class="cx">
</span><del>- accounts = FilePath(config.DataRoot).child("accounts.xml")
- accounts.setContent(xmlFile.getContent())
</del><span class="cx">
</span><del>- resources = FilePath(config.DataRoot).child("resources.xml")
- resources.setContent(resourcesFile.getContent())
-
- augments = FilePath(config.DataRoot).child("augments.xml")
- augments.setContent(augmentsFile.getContent())
-
- proxies = FilePath(config.DataRoot).child("proxies.xml")
- proxies.setContent(proxiesFile.getContent())
-
-
</del><span class="cx"> def createHierarchy(self, structure, root=None):
</span><span class="cx"> if root is None:
</span><span class="cx"> root = os.path.abspath(self.mktemp())
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingcaldavtesttest_schedulerpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/caldav/test/test_scheduler.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/caldav/test/test_scheduler.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/caldav/test/test_scheduler.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -23,10 +23,10 @@
</span><span class="cx">
</span><span class="cx"> from twistedcaldav.ical import Component
</span><span class="cx">
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.test.util import CommonCommonTests, populateCalendarsFrom
</span><span class="cx"> from txdav.caldav.datastore.scheduling.caldav.scheduler import CalDAVScheduler
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> def normalizeiCalendarText(data):
</span><span class="cx"> data = data.replace("\r\n ", "")
</span><span class="cx"> data = [line for line in data.splitlines() if not (line.startswith("UID") or line.startswith("DTSTAMP"))]
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(SchedulerFreeBusyRequest, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx"> self.now = DateTime.getNowUTC()
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingimiptesttest_inboundpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/imip/test/test_inbound.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -28,20 +28,19 @@
</span><span class="cx"> from txdav.caldav.datastore.scheduling.imip.inbound import shouldDeleteAllMail
</span><span class="cx"> from txdav.caldav.datastore.scheduling.imip.inbound import IMAP4DownloadProtocol
</span><span class="cx"> from txdav.caldav.datastore.scheduling.itip import iTIPRequestStatus
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><ins>+from txdav.common.datastore.test.util import CommonCommonTests
</ins><span class="cx">
</span><span class="cx"> import email
</span><span class="cx"> from twisted.trial import unittest
</span><span class="cx">
</span><span class="cx">
</span><del>-class InboundTests(unittest.TestCase):
</del><ins>+class InboundTests(CommonCommonTests, unittest.TestCase):
</ins><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> super(InboundTests, self).setUp()
</span><span class="cx">
</span><del>- self.store = yield buildCalendarStore(self, None)
- self.directory = self.store.directoryService()
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> self.receiver = MailReceiver(self.store, self.directory)
</span><span class="cx"> self.retriever = MailRetriever(self.store, self.directory,
</span><span class="cx"> ConfigDict({
</span><span class="lines">@@ -283,7 +282,7 @@
</span><span class="cx"> DTSTAMP:20130208T120000Z
</span><span class="cx"> DTSTART:20180601T120000Z
</span><span class="cx"> DTEND:20180601T130000Z
</span><del>-ORGANIZER:urn:uuid:user01
</del><ins>+ORGANIZER:urn:x-uid:user01
</ins><span class="cx"> ATTENDEE:mailto:xyzzy@example.com;PARTSTAT=ACCEPTED
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -292,7 +291,7 @@
</span><span class="cx"> txn = self.store.newTransaction()
</span><span class="cx"> result = (yield injectMessage(
</span><span class="cx"> txn,
</span><del>- "urn:uuid:user01",
</del><ins>+ "urn:x-uid:user01",
</ins><span class="cx"> "mailto:xyzzy@example.com",
</span><span class="cx"> calendar
</span><span class="cx"> )
</span><span class="lines">@@ -316,7 +315,7 @@
</span><span class="cx"> DTSTAMP:20130208T120000Z
</span><span class="cx"> DTSTART:20180601T120000Z
</span><span class="cx"> DTEND:20180601T130000Z
</span><del>-ORGANIZER:urn:uuid:unknown_user
</del><ins>+ORGANIZER:urn:x-uid:unknown_user
</ins><span class="cx"> ATTENDEE:mailto:xyzzy@example.com;PARTSTAT=ACCEPTED
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -325,7 +324,7 @@
</span><span class="cx"> txn = self.store.newTransaction()
</span><span class="cx"> result = (yield injectMessage(
</span><span class="cx"> txn,
</span><del>- "urn:uuid:unknown_user",
</del><ins>+ "urn:x-uid:unknown_user",
</ins><span class="cx"> "mailto:xyzzy@example.com",
</span><span class="cx"> calendar
</span><span class="cx"> )
</span><span class="lines">@@ -349,14 +348,14 @@
</span><span class="cx"> DTSTAMP:20130208T120000Z
</span><span class="cx"> DTSTART:20180601T120000Z
</span><span class="cx"> DTEND:20180601T130000Z
</span><del>-ORGANIZER:urn:uuid:user01
</del><ins>+ORGANIZER:urn:x-uid:user01
</ins><span class="cx"> ATTENDEE:mailto:xyzzy@example.com;PARTSTAT=ACCEPTED
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """
</span><span class="cx"> txn = self.store.newTransaction()
</span><span class="cx"> wp = (yield txn.enqueue(IMIPReplyWork,
</span><del>- organizer="urn:uuid:user01",
</del><ins>+ organizer="urn:x-uid:user01",
</ins><span class="cx"> attendee="mailto:xyzzy@example.com",
</span><span class="cx"> icalendarText=calendar
</span><span class="cx"> ))
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingischedulelocalserverspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> __all__ = [
</span><del>- "Servers",
</del><ins>+ "buildServersDB",
</ins><span class="cx"> ]
</span><span class="cx">
</span><span class="cx"> log = Logger()
</span><span class="lines">@@ -122,10 +122,17 @@
</span><span class="cx"> maxClients,
</span><span class="cx"> )
</span><span class="cx">
</span><del>-Servers = ServersDB() # Global server DB
</del><span class="cx">
</span><span class="cx">
</span><ins>+def buildServersDB(maxClients=5):
+ serversDB = ServersDB()
+ serversDB.load()
+ serversDB.installReverseProxies(maxClients)
+ return serversDB
</ins><span class="cx">
</span><ins>+
+
+
</ins><span class="cx"> class Server(object):
</span><span class="cx"> """
</span><span class="cx"> Represents a server.
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingischeduleschedulerpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/scheduler.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/scheduler.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/scheduler.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> from txdav.caldav.datastore.scheduling.ischedule import xml
</span><span class="cx"> from txdav.caldav.datastore.scheduling.ischedule.dkim import DKIMVerifier, \
</span><span class="cx"> DKIMVerificationError, DKIMMissingError
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers
</del><span class="cx"> from txdav.caldav.datastore.scheduling.ischedule.remoteservers import IScheduleServers
</span><span class="cx"> from txdav.caldav.datastore.scheduling.ischedule.utils import getIPsFromHost
</span><span class="cx"> from txdav.caldav.datastore.scheduling.ischedule.xml import ischedule_namespace
</span><span class="lines">@@ -57,6 +56,7 @@
</span><span class="cx">
</span><span class="cx"> log = Logger()
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class ErrorResponse(Response):
</span><span class="cx"> """
</span><span class="cx"> A L{Response} object which contains a status code and a L{element.Error}
</span><span class="lines">@@ -339,13 +339,14 @@
</span><span class="cx">
</span><span class="cx"> # Check against this server.
</span><span class="cx"> matched = False
</span><del>- if Servers.getThisServer().checkThisIP(clientip):
</del><ins>+ serversDB = self.txn._store.directoryService().serversDB
+ if serversDB.getThisServer().checkThisIP(clientip):
</ins><span class="cx"> matched = True
</span><span class="cx">
</span><span class="cx"> # Checked allowed IPs - if any were defined we only check against them, we do not
</span><span class="cx"> # go on to check the expected server host ip
</span><del>- elif Servers.getThisServer().hasAllowedFromIP():
- matched = Servers.getThisServer().checkAllowedFromIP(clientip)
</del><ins>+ elif serversDB.getThisServer().hasAllowedFromIP():
+ matched = serversDB.getThisServer().checkAllowedFromIP(clientip)
</ins><span class="cx"> if not matched:
</span><span class="cx"> log.error("Invalid iSchedule connection from client: %s" % (clientip,))
</span><span class="cx">
</span><span class="lines">@@ -365,7 +366,7 @@
</span><span class="cx"> log.debug("iSchedule cannot lookup client ip '%s': %s" % (clientip, str(e),))
</span><span class="cx">
</span><span class="cx"> # Check possible shared secret
</span><del>- if matched and not Servers.getThisServer().checkSharedSecret(self.headers):
</del><ins>+ if matched and not serversDB.getThisServer().checkSharedSecret(self.headers):
</ins><span class="cx"> log.error("Invalid iSchedule shared secret")
</span><span class="cx"> matched = False
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingischeduletesttest_localserverspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_localservers.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_localservers.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_localservers.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -20,10 +20,13 @@
</span><span class="cx">
</span><span class="cx"> from twistedcaldav.stdconfig import config
</span><span class="cx">
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers, SERVER_SECRET_HEADER
</del><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import (
+ ServersDB, SERVER_SECRET_HEADER
+)
</ins><span class="cx">
</span><span class="cx"> import StringIO as StringIO
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class ServerTests(unittest.TestCase):
</span><span class="cx">
</span><span class="cx"> data1 = """<?xml version="1.0" encoding="utf-8"?>
</span><span class="lines">@@ -61,7 +64,7 @@
</span><span class="cx"> self.patch(config, "HTTPPort", 8008)
</span><span class="cx">
</span><span class="cx"> xmlFile = StringIO.StringIO(data)
</span><del>- servers = Servers
</del><ins>+ servers = ServersDB()
</ins><span class="cx"> servers.load(xmlFile, ignoreIPLookupFailures=True)
</span><span class="cx">
</span><span class="cx"> return servers
</span><span class="lines">@@ -96,7 +99,7 @@
</span><span class="cx"> self.patch(config, "BindSSLPorts", [8843])
</span><span class="cx">
</span><span class="cx"> xmlFile = StringIO.StringIO(ServerTests.data1)
</span><del>- servers = Servers
</del><ins>+ servers = ServersDB()
</ins><span class="cx"> servers.load(xmlFile, ignoreIPLookupFailures=True)
</span><span class="cx">
</span><span class="cx"> self.assertFalse(servers.getServerById("00001").thisServer)
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingischeduletesttest_resourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_resource.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_resource.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/test/test_resource.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -29,45 +29,29 @@
</span><span class="cx"> CommonCommonTests
</span><span class="cx"> from twext.python.clsprop import classproperty
</span><span class="cx"> import txweb2.dav.test.util
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore, \
- TestCalendarStoreDirectoryRecord
-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers, \
- Server
</del><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import (
+ ServersDB, Server
+)
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> class iSchedulePOST (CommonCommonTests, txweb2.dav.test.util.TestCase):
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(iSchedulePOST, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
- self.directory = self._sqlCalendarStore.directoryService()
</del><span class="cx">
</span><ins>+ serversDB = ServersDB()
+ a_server = Server("A", "http://localhost:8008", thisServer=True)
+ serversDB.addServer(a_server)
+ b_server = Server("B", "http://localhost:8108", thisServer=False)
+ serversDB.addServer(b_server)
+ yield self.buildStoreAndDirectory(serversDB=serversDB)
+
</ins><span class="cx"> self.site.resource.putChild("ischedule", IScheduleInboxResource(self.site.resource, self.storeUnderTest()))
</span><span class="cx"> self.site.resource.putChild("podding", IScheduleInboxResource(self.site.resource, self.storeUnderTest(), podding=True))
</span><span class="cx">
</span><span class="cx"> yield self.populate()
</span><span class="cx">
</span><del>- # Pod servers
- a_server = Server(id="A", uri="http://localhost:8008", thisServer=True)
- Servers.addServer(a_server)
- b_server = Server(id="B", uri="http://localhost:8108", thisServer=False)
- Servers.addServer(b_server)
- Servers._thisServer = a_server
-
- # Podded users
- for ctr in range(1, 100):
- self.directory.addRecord(TestCalendarStoreDirectoryRecord(
- "puser{:02d}".format(ctr),
- ("puser{:02d}".format(ctr),),
- "Puser {:02d}".format(ctr),
- frozenset((
- "urn:uuid:puser{:02d}".format(ctr),
- "mailto:puser{:02d}@example.com".format(ctr),
- )),
- thisServer=False,
- server=b_server,
- ))
-
</del><span class="cx"> # iSchedule server
</span><span class="cx"> IScheduleServers()
</span><span class="cx"> server = IScheduleServerRecord("http://127.0.0.1")
</span><span class="lines">@@ -76,13 +60,6 @@
</span><span class="cx"> self.addCleanup(lambda : IScheduleServers._domainMap.pop("example.org")) #@UndefinedVariable
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def populate(self):
</span><span class="cx"> yield populateCalendarsFrom(self.requirements, self.storeUnderTest())
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_cuaddresspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_cuaddress.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_cuaddress.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_cuaddress.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx">
</span><span class="cx"> from txdav.caldav.datastore.scheduling.cuaddress import calendarUserFromCalendarUserAddress, \
</span><span class="cx"> LocalCalendarUser, InvalidCalendarUser
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.test.util import populateCalendarsFrom, CommonCommonTests
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -50,10 +49,9 @@
</span><span class="cx"> def setUp(self):
</span><span class="cx">
</span><span class="cx"> yield super(CalendarUser, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
- self.directory = self._sqlCalendarStore.directoryService()
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><del>- self.directory.removeRecord("user03")
</del><ins>+ yield self.removeRecord(u"user03")
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -62,13 +60,6 @@
</span><span class="cx"> self.notifierFactory.reset()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_lookup(self):
</span><span class="cx"> """
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_freebusypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_freebusy.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_freebusy.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_freebusy.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx">
</span><span class="cx"> from txdav.caldav.datastore.scheduling.freebusy import buildFreeBusyResult, \
</span><span class="cx"> generateFreeBusyInfo
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.test.util import CommonCommonTests, populateCalendarsFrom
</span><span class="cx">
</span><span class="cx"> def normalizeiCalendarText(data):
</span><span class="lines">@@ -266,7 +265,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(GenerateFreeBusyInfo, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx"> self.now = DateTime.getNowUTC()
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_implicitpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_implicit.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_implicit.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_implicit.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -34,8 +34,6 @@
</span><span class="cx"> from txdav.caldav.datastore.scheduling.implicit import ImplicitScheduler, \
</span><span class="cx"> ScheduleReplyWork
</span><span class="cx"> from txdav.caldav.datastore.scheduling.scheduler import ScheduleResponseQueue
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore, \
- buildDirectoryRecord
</del><span class="cx"> from txdav.caldav.icalendarstore import AttendeeAllowedError, \
</span><span class="cx"> ComponentUpdateState
</span><span class="cx"> from txdav.common.datastore.test.util import CommonCommonTests, populateCalendarsFrom
</span><span class="lines">@@ -58,45 +56,18 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class FakeDirectoryService(object):
-
- def recordWithUID(self, uid):
- return buildDirectoryRecord(uid)
-
-
-
-class FakeCalendarHome(object):
-
- def __init__(self, uid):
- self._uid = uid
-
-
- def uid(self):
- return self._uid
-
-
- def directoryService(self):
- if not hasattr(self, "_directoryService"):
- self._directoryService = FakeDirectoryService()
- return self._directoryService
-
-
-
-class FakeTxn(object):
-
- def directoryService(self):
- if not hasattr(self, "_directoryService"):
- self._directoryService = FakeDirectoryService()
- return self._directoryService
-
-
-
-class Implicit(TestCase):
</del><ins>+class Implicit(CommonCommonTests, TestCase):
</ins><span class="cx"> """
</span><span class="cx"> iCalendar support tests
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><ins>+ def setUp(self):
+ yield super(Implicit, self).setUp()
+ yield self.buildStoreAndDirectory()
+
+
+ @inlineCallbacks
</ins><span class="cx"> def test_removed_attendees(self):
</span><span class="cx">
</span><span class="cx"> data = (
</span><span class="lines">@@ -109,9 +80,9 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -122,9 +93,9 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -139,9 +110,9 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -152,12 +123,12 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><del>- (("mailto:user2@example.com", None),),
</del><ins>+ (("mailto:user02@example.com", None),),
</ins><span class="cx"> ),
</span><span class="cx"> (
</span><span class="cx"> "#1.3 Simple component, two removals",
</span><span class="lines">@@ -168,10 +139,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -182,14 +153,14 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user2@example.com", None),
- ("mailto:user3@example.com", None),
</del><ins>+ ("mailto:user02@example.com", None),
+ ("mailto:user03@example.com", None),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -201,10 +172,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -216,15 +187,15 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user2@example.com", None),
- ("mailto:user3@example.com", None),
</del><ins>+ ("mailto:user02@example.com", None),
+ ("mailto:user03@example.com", None),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -236,10 +207,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -251,19 +222,19 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> EXDATE:20080801T120000Z
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user1@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user01@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -275,10 +246,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -290,22 +261,22 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> EXDATE:20080801T120000Z,20080901T120000Z
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user1@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user1@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user01@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user01@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -317,10 +288,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -332,10 +303,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> EXDATE:20080801T120000Z,20080901T120000Z
</span><span class="cx"> EXDATE:20081201T120000Z
</span><span class="lines">@@ -343,15 +314,15 @@
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user1@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user1@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user1@example.com", DateTime(2008, 12, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 12, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 12, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user01@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user01@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 9, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user01@example.com", DateTime(2008, 12, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 12, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 12, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -363,10 +334,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -374,10 +345,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -388,10 +359,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -399,10 +370,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -417,10 +388,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -428,10 +399,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -442,9 +413,9 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -452,15 +423,15 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user3@example.com", None),
- ("mailto:user3@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user03@example.com", None),
+ ("mailto:user03@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -472,10 +443,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -483,10 +454,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -497,10 +468,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -508,14 +479,14 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user3@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user03@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -527,10 +498,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -538,10 +509,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -552,9 +523,9 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -562,15 +533,15 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user3@example.com", None),
</del><ins>+ ("mailto:user03@example.com", None),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -582,10 +553,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -593,10 +564,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -607,10 +578,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="lines">@@ -626,10 +597,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -637,10 +608,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -651,19 +622,19 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> EXDATE:20080801T120000Z
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user1@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user3@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user01@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user03@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -675,10 +646,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -686,10 +657,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user4@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user04@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -700,9 +671,9 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -710,15 +681,15 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user3@example.com", None),
- ("mailto:user4@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user03@example.com", None),
+ ("mailto:user04@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -730,10 +701,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -741,10 +712,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user4@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user04@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -755,16 +726,16 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user4@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user04@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> (
</span><span class="lines">@@ -776,10 +747,10 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> END:VEVENT
</span><span class="cx"> BEGIN:VEVENT
</span><span class="lines">@@ -787,10 +758,10 @@
</span><span class="cx"> RECURRENCE-ID:20080801T120000Z
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user4@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user04@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="lines">@@ -801,19 +772,19 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
</ins><span class="cx"> RRULE:FREQ=MONTHLY
</span><span class="cx"> EXDATE:20080801T120000Z
</span><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """,
</span><span class="cx"> (
</span><del>- ("mailto:user1@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user2@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
- ("mailto:user4@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</del><ins>+ ("mailto:user01@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user02@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
+ ("mailto:user04@example.com", DateTime(2008, 8, 1, 12, 0, 0, tzid=Timezone(utc=True))),
</ins><span class="cx"> ),
</span><span class="cx"> ),
</span><span class="cx"> )
</span><span class="lines">@@ -826,12 +797,14 @@
</span><span class="cx"> scheduler.oldInstances = set(scheduler.oldcalendar.getComponentInstances())
</span><span class="cx"> scheduler.calendar = Component.fromString(calendar2)
</span><span class="cx">
</span><del>- scheduler.calendar_home = FakeCalendarHome("user01")
- scheduler.txn = FakeTxn()
</del><ins>+ txn = self.transactionUnderTest()
+ scheduler.txn = txn
+ scheduler.calendar_home = yield self.homeUnderTest(txn=txn, name=u"user01", create=True)
</ins><span class="cx">
</span><span class="cx"> yield scheduler.extractCalendarData()
</span><span class="cx"> scheduler.findRemovedAttendees()
</span><span class="cx"> self.assertEqual(scheduler.cancelledAttendees, set(result), msg=description)
</span><ins>+ yield self.commit()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -841,9 +814,9 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> data = (
</span><del>- ((), None, 3, ("mailto:user2@example.com", "mailto:user3@example.com", "mailto:user4@example.com",),),
- (("mailto:user2@example.com",), None, 2, ("mailto:user3@example.com", "mailto:user4@example.com",),),
- ((), ("mailto:user2@example.com", "mailto:user4@example.com",) , 2, ("mailto:user2@example.com", "mailto:user4@example.com",),),
</del><ins>+ ((), None, 3, ("mailto:user02@example.com", "mailto:user03@example.com", "mailto:user04@example.com",),),
+ (("mailto:user02@example.com",), None, 2, ("mailto:user03@example.com", "mailto:user04@example.com",),),
+ ((), ("mailto:user02@example.com", "mailto:user04@example.com",) , 2, ("mailto:user02@example.com", "mailto:user04@example.com",),),
</ins><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> calendar = """BEGIN:VCALENDAR
</span><span class="lines">@@ -853,11 +826,11 @@
</span><span class="cx"> UID:12345-67890
</span><span class="cx"> DTSTART:20080601T120000Z
</span><span class="cx"> DTEND:20080601T130000Z
</span><del>-ORGANIZER;CN="User 01":mailto:user1@example.com
-ATTENDEE:mailto:user1@example.com
-ATTENDEE:mailto:user2@example.com
-ATTENDEE:mailto:user3@example.com
-ATTENDEE:mailto:user4@example.com
</del><ins>+ORGANIZER;CN="User 01":mailto:user01@example.com
+ATTENDEE:mailto:user01@example.com
+ATTENDEE:mailto:user02@example.com
+ATTENDEE:mailto:user03@example.com
+ATTENDEE:mailto:user04@example.com
</ins><span class="cx"> END:VEVENT
</span><span class="cx"> END:VCALENDAR
</span><span class="cx"> """
</span><span class="lines">@@ -874,14 +847,16 @@
</span><span class="cx"> scheduler.changed_rids = None
</span><span class="cx"> scheduler.reinvites = None
</span><span class="cx">
</span><del>- scheduler.calendar_home = FakeCalendarHome("user1")
- scheduler.txn = FakeTxn()
</del><ins>+ txn = self.transactionUnderTest()
+ scheduler.txn = txn
+ scheduler.calendar_home = yield self.homeUnderTest(txn=txn, name=u"user01", create=True)
</ins><span class="cx">
</span><span class="cx"> # Get some useful information from the calendar
</span><span class="cx"> yield scheduler.extractCalendarData()
</span><ins>+ record = yield self.directory.recordWithUID(scheduler.calendar_home.uid())
</ins><span class="cx"> scheduler.organizerAddress = LocalCalendarUser(
</span><del>- "mailto:user1@example.com",
- buildDirectoryRecord(scheduler.calendar_home.uid()),
</del><ins>+ "mailto:user01@example.com",
+ record,
</ins><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> recipients = []
</span><span class="lines">@@ -894,6 +869,7 @@
</span><span class="cx"> self.assertEqual(count, result_count)
</span><span class="cx"> self.assertEqual(len(recipients), result_count)
</span><span class="cx"> self.assertEqual(set(recipients), set(result_set))
</span><ins>+ yield self.commit()
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -905,7 +881,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(ImplicitRequests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -939,13 +915,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def _createCalendarObject(self, data, user, name):
</span><span class="cx"> calendar_collection = (yield self.calendarUnderTest(home=user))
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoreschedulingtesttest_utilspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_utils.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_utils.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_utils.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -25,8 +25,6 @@
</span><span class="cx">
</span><span class="cx"> from txdav.caldav.datastore.scheduling.utils import getCalendarObjectForRecord, \
</span><span class="cx"> extractEmailDomain, uidFromCalendarUserAddress
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore, \
- buildDirectoryRecord
</del><span class="cx"> from txdav.common.datastore.test.util import populateCalendarsFrom, CommonCommonTests
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -107,10 +105,9 @@
</span><span class="cx"> def setUp(self):
</span><span class="cx">
</span><span class="cx"> yield super(RecipientCopy, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><del>- self.directory = self._sqlCalendarStore.directoryService()
</del><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -145,7 +142,7 @@
</span><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> # Look up resource by UID in home where only one exists
</span><del>- principal = buildDirectoryRecord("user01")
</del><ins>+ principal = yield self.directory.recordWithUID(u"user01")
</ins><span class="cx"> txn = self.transactionUnderTest()
</span><span class="cx"> resource = (yield getCalendarObjectForRecord(txn, principal, "685BC3A1-195A-49B3-926D-388DDACA78A6"))
</span><span class="cx"> self.assertEqual(resource.name(), "1.ics")
</span><span class="lines">@@ -165,7 +162,7 @@
</span><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> # Look up resource by UID in home where two exists
</span><del>- principal = buildDirectoryRecord("user02")
</del><ins>+ principal = yield self.directory.recordWithUID("user02")
</ins><span class="cx"> txn = self.transactionUnderTest()
</span><span class="cx"> resource = (yield getCalendarObjectForRecord(txn, principal, "685BC3A1-195A-49B3-926D-388DDACA78A6"))
</span><span class="cx"> self.assertTrue(resource.name() in ("2.ics", "3.ics",))
</span><span class="lines">@@ -183,7 +180,7 @@
</span><span class="cx"> yield self.commit()
</span><span class="cx">
</span><span class="cx"> # Look up resource where principal exists but home does not
</span><del>- principal = buildDirectoryRecord("user102")
</del><ins>+ principal = yield self.directory.recordWithUID("user102") # ASKCYRUS: but user102 doesn't exist
</ins><span class="cx"> txn = self.transactionUnderTest()
</span><span class="cx"> resource = (yield getCalendarObjectForRecord(txn, principal, "685BC3A1-195A-49B3-926D-388DDACA78A6"))
</span><span class="cx"> self.assertTrue(resource is None)
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_attachmentspy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_attachments.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -14,8 +14,6 @@
</span><span class="cx"> # limitations under the License.
</span><span class="cx"> ##
</span><span class="cx">
</span><del>-from txdav.who.util import directoryFromConfig
-
</del><span class="cx"> from pycalendar.datetime import DateTime
</span><span class="cx"> from pycalendar.value import Value
</span><span class="cx">
</span><span class="lines">@@ -34,7 +32,6 @@
</span><span class="cx"> from txdav.caldav.datastore.sql import CalendarStoreFeatures, DropBoxAttachment, \
</span><span class="cx"> ManagedAttachment
</span><span class="cx"> from txdav.caldav.datastore.test.common import CaptureProtocol
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.caldav.icalendarstore import IAttachmentStorageTransport, IAttachment, \
</span><span class="cx"> QuotaExceeded, AttachmentSizeTooLarge
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><span class="lines">@@ -99,7 +96,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(AttachmentTests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1536,18 +1533,13 @@
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(AttachmentMigrationTests, self).setUp()
</span><span class="cx">
</span><del>- self.patch(config.DirectoryService.params, "xmlFile",
- os.path.join(
- os.path.dirname(__file__), "attachments", "accounts.xml"
- )
</del><ins>+ attachmentsFilePath = FilePath(
+ os.path.join(os.path.dirname(__file__), "attachments")
</ins><span class="cx"> )
</span><del>- self.patch(config.ResourceService.params, "xmlFile",
- os.path.join(
- os.path.dirname(__file__), "attachments", "resources.xml"
- )
</del><ins>+ yield self.buildStoreAndDirectory(
+ accounts=attachmentsFilePath.child("accounts.xml"),
+ resources=attachmentsFilePath.child("resources.xml"),
</ins><span class="cx"> )
</span><del>-
- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory, directoryFromConfig(config))
</del><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx"> self.paths = {}
</span><span class="lines">@@ -1577,13 +1569,6 @@
</span><span class="cx"> yield txn.commit()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def _addAttachment(self, home, calendar, event, dropboxid, name):
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_filepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_file.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_file.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_file.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -13,7 +13,6 @@
</span><span class="cx"> # See the License for the specific language governing permissions and
</span><span class="cx"> # limitations under the License.
</span><span class="cx"> ##
</span><del>-from txdav.caldav.datastore.test.util import buildDirectory
</del><span class="cx">
</span><span class="cx"> """
</span><span class="cx"> File calendar store tests.
</span><span class="lines">@@ -23,29 +22,27 @@
</span><span class="cx"> # deleted and replaced with either implementation-specific methods on
</span><span class="cx"> # FileStorageTests, or implementation-agnostic methods on CommonTests.
</span><span class="cx">
</span><ins>+from pycalendar.datetime import DateTime
+from twext.python.filepath import CachingFilePath as FilePath
+from twisted.internet.defer import inlineCallbacks
</ins><span class="cx"> from twisted.trial import unittest
</span><del>-from twisted.internet.defer import inlineCallbacks
-
-from twext.python.filepath import CachingFilePath as FilePath
-
</del><span class="cx"> from twistedcaldav.ical import Component as VComponent
</span><del>-
</del><ins>+from txdav.caldav.datastore.file import Calendar, CalendarObject
+from txdav.caldav.datastore.file import CalendarStore, CalendarHome
+from txdav.caldav.datastore.test.common import (
+ CommonTests, test_event_text, event1modified_text
+)
+from txdav.common.datastore.test.util import buildTestDirectory
+from txdav.common.datastore.test.util import StubNotifierFactory
+from txdav.common.datastore.test.util import deriveQuota
</ins><span class="cx"> from txdav.common.icommondatastore import HomeChildNameNotAllowedError
</span><ins>+from txdav.common.icommondatastore import NoSuchHomeChildError
</ins><span class="cx"> from txdav.common.icommondatastore import ObjectResourceNameNotAllowedError
</span><span class="cx"> from txdav.common.icommondatastore import ObjectResourceUIDAlreadyExistsError
</span><del>-from txdav.common.icommondatastore import NoSuchHomeChildError
</del><span class="cx">
</span><del>-from txdav.caldav.datastore.file import CalendarStore, CalendarHome
-from txdav.caldav.datastore.file import Calendar, CalendarObject
</del><ins>+storePath = FilePath(__file__).parent().child("calendar_store")
</ins><span class="cx">
</span><del>-from txdav.common.datastore.test.util import deriveQuota
-from txdav.caldav.datastore.test.common import (
- CommonTests, test_event_text, event1modified_text)
</del><span class="cx">
</span><del>-from pycalendar.datetime import DateTime
-
-storePath = FilePath(__file__).parent().child("calendar_store")
-
</del><span class="cx"> def _todo(f, why):
</span><span class="cx"> f.todo = why
</span><span class="cx"> return f
</span><span class="lines">@@ -78,12 +75,15 @@
</span><span class="cx"> resource.setContent(resource.getContent() % {"now": nowYear})
</span><span class="cx">
</span><span class="cx"> testID = test.id()
</span><ins>+ test.counter = 0
+ test.notifierFactory = StubNotifierFactory()
</ins><span class="cx"> test.calendarStore = CalendarStore(
</span><span class="cx"> storeRootPath,
</span><span class="cx"> {"push": test.notifierFactory} if test.notifierFactory else {},
</span><del>- buildDirectory(),
</del><ins>+ None, # must create directory later
</ins><span class="cx"> quota=deriveQuota(test),
</span><span class="cx"> )
</span><ins>+ test.directory = buildTestDirectory(test.calendarStore, test.mktemp())
</ins><span class="cx"> test.txn = test.calendarStore.newTransaction(testID + "(old)")
</span><span class="cx"> assert test.calendarStore is not None, "No calendar store?"
</span><span class="cx">
</span><span class="lines">@@ -131,6 +131,7 @@
</span><span class="cx"> class CalendarHomeTest(unittest.TestCase):
</span><span class="cx">
</span><span class="cx"> notifierFactory = None
</span><ins>+
</ins><span class="cx"> def setUp(self):
</span><span class="cx"> return setUpHome1(self)
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_implicitpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_implicit.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_implicit.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_implicit.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -30,9 +30,9 @@
</span><span class="cx"> TooManyAttendeesError, InvalidCalendarAccessError, ComponentUpdateState, \
</span><span class="cx"> DuplicatePrivateCommentsError
</span><span class="cx"> from txdav.common.datastore.sql_tables import _BIND_MODE_WRITE
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.caldav.datastore.sql import CalendarObject
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class ImplicitRequests (CommonCommonTests, TestCase):
</span><span class="cx"> """
</span><span class="cx"> Test twistedcaldav.scheduyling.implicit with a Request object.
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(ImplicitRequests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_sql.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -55,7 +55,6 @@
</span><span class="cx"> from txdav.caldav.datastore.test.common import CommonTests as CalendarCommonTests, \
</span><span class="cx"> test_event_text
</span><span class="cx"> from txdav.caldav.datastore.test.test_file import setUpCalendarStore
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.caldav.datastore.util import _migrateCalendar, migrateHome
</span><span class="cx"> from txdav.caldav.icalendarstore import ComponentUpdateState, InvalidDefaultCalendar, \
</span><span class="cx"> InvalidSplit
</span><span class="lines">@@ -79,7 +78,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(CalendarSQLStorageTests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx"> self.nowYear = {"now": DateTime.getToday().getYear()}
</span><span class="lines">@@ -91,13 +90,6 @@
</span><span class="cx"> self.notifierFactory.reset()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def assertCalendarsSimilar(self, a, b, bCalendarFilter=None):
</span><span class="cx"> """
</span><span class="lines">@@ -1990,7 +1982,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(SchedulingTests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx">
</span><span class="cx"> # Make sure homes are provisioned
</span><span class="cx"> txn = self.transactionUnderTest()
</span><span class="lines">@@ -2006,13 +1998,6 @@
</span><span class="cx"> self.notifierFactory.reset()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_doImplicitAttendeeEventFix(self):
</span><span class="cx"> """
</span><span class="lines">@@ -2181,7 +2166,7 @@
</span><span class="cx"> DTSTART;TZID=America/Los_Angeles:20131211T164500
</span><span class="cx"> DTEND;TZID=America/Los_Angeles:20131211T174500
</span><span class="cx"> ATTENDEE;CN=Conference Room One;CUTYPE=ROOM;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPAN
</span><del>- T;SCHEDULE-STATUS=2.0:urn:x-uid:room1
</del><ins>+ T;SCHEDULE-STATUS=2.0:urn:x-uid:room-addr-1
</ins><span class="cx"> ATTENDEE;CN=User 01;CUTYPE=INDIVIDUAL;EMAIL=user01@example.com;PARTSTAT=AC
</span><span class="cx"> CEPTED:urn:x-uid:user01
</span><span class="cx"> CREATED:20131211T221854Z
</span><span class="lines">@@ -2198,7 +2183,7 @@
</span><span class="cx"> DTSTART;TZID=America/Los_Angeles:20131214T160000
</span><span class="cx"> DTEND;TZID=America/Los_Angeles:20131214T170000
</span><span class="cx"> ATTENDEE;CN=Conference Room Two;CUTYPE=ROOM;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPAN
</span><del>- T;SCHEDULE-STATUS=2.0:urn:x-uid:room2
</del><ins>+ T;SCHEDULE-STATUS=2.0:urn:x-uid:room-addr-2
</ins><span class="cx"> ATTENDEE;CN=User 01;CUTYPE=INDIVIDUAL;EMAIL=user01@example.com;PARTSTAT=AC
</span><span class="cx"> CEPTED:urn:x-uid:user01
</span><span class="cx"> CREATED:20131211T221854Z
</span><span class="lines">@@ -2222,7 +2207,7 @@
</span><span class="cx"> # Check first component
</span><span class="cx"> locProp = components[0].getProperty("LOCATION")
</span><span class="cx"> self.assertEquals(locProp.value(),
</span><del>- "Conference Room One\n1 Infinite Loop, Cupertino, CA 95014")
</del><ins>+ "Room with Address 1\n1 Infinite Loop, Cupertino, CA 95014")
</ins><span class="cx"> structProp = components[0].getProperty("X-APPLE-STRUCTURED-LOCATION")
</span><span class="cx"> self.assertEquals(structProp.value(),
</span><span class="cx"> "geo:37.331741,-122.030333")
</span><span class="lines">@@ -2230,7 +2215,7 @@
</span><span class="cx"> # Check second component
</span><span class="cx"> locProp = components[1].getProperty("LOCATION")
</span><span class="cx"> self.assertEquals(locProp.value(),
</span><del>- "Conference Room Two\n2 Infinite Loop, Cupertino, CA 95014")
</del><ins>+ "Room with Address 2\n2 Infinite Loop, Cupertino, CA 95014")
</ins><span class="cx"> structProp = components[1].getProperty("X-APPLE-STRUCTURED-LOCATION")
</span><span class="cx"> self.assertEquals(structProp.value(),
</span><span class="cx"> "geo:37.332633,-122.030502")
</span><span class="lines">@@ -2247,7 +2232,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(CalendarObjectSplitting, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx">
</span><span class="cx"> # Make sure homes are provisioned
</span><span class="cx"> txn = self.transactionUnderTest()
</span><span class="lines">@@ -2299,13 +2284,6 @@
</span><span class="cx"> self.notifierFactory.reset()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def _splitDetails(self, home):
</span><span class="cx"> # Get home data
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_sql_sharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_sql_sharing.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_sql_sharing.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_sql_sharing.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -21,7 +21,6 @@
</span><span class="cx"> from twext.python.clsprop import classproperty
</span><span class="cx"> from txdav.common.datastore.test.util import CommonCommonTests, \
</span><span class="cx"> populateCalendarsFrom
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.sql_tables import _BIND_MODE_READ, \
</span><span class="cx"> _BIND_STATUS_INVITED, _BIND_MODE_DIRECT, _BIND_STATUS_ACCEPTED
</span><span class="cx">
</span><span class="lines">@@ -34,7 +33,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(BaseSharingTests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretesttest_utilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/test_util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/test_util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/test_util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> from twistedcaldav.test.util import TestCase
</span><span class="cx">
</span><span class="cx"> from txdav.common.datastore.test.util import populateCalendarsFrom, CommonCommonTests
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx">
</span><span class="cx"> from txdav.caldav.datastore.util import dropboxIDFromCalendarObject, \
</span><span class="cx"> StorageTransportBase, migrateHome
</span><span class="lines">@@ -323,18 +322,17 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(HomeMigrationTests, self).setUp()
</span><del>- self.theStore = yield buildCalendarStore(self, self.notifierFactory, homes=(
- "conflict1",
- "conflict2",
- "empty_home",
- "non_empty_home",
- ))
</del><ins>+ yield self.buildStoreAndDirectory(
+ extraUids=(
+ u"conflict1",
+ u"conflict2",
+ u"empty_home",
+ u"non_empty_home",
+ )
+ )
</ins><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- return self.theStore
</del><span class="cx">
</span><del>-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_migrateEmptyHome(self):
</span><span class="cx"> """
</span></span></pre></div>
<a id="CalendarServertrunktxdavcaldavdatastoretestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/caldav/datastore/test/util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/caldav/datastore/test/util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/caldav/datastore/test/util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -16,230 +16,23 @@
</span><span class="cx"> ##
</span><span class="cx"> from twisted.trial.unittest import TestCase
</span><span class="cx"> from twext.python.clsprop import classproperty
</span><del>-from twisted.internet.defer import inlineCallbacks, succeed
</del><ins>+from twisted.internet.defer import inlineCallbacks
</ins><span class="cx">
</span><span class="cx"> """
</span><span class="cx"> Store test utility functions
</span><span class="cx"> """
</span><span class="cx">
</span><del>-from twistedcaldav.config import config
-from txdav.caldav.icalendardirectoryservice import ICalendarStoreDirectoryService, \
- ICalendarStoreDirectoryRecord
-from txdav.common.datastore.test.util import TestStoreDirectoryService, \
- TestStoreDirectoryRecord, theStoreBuilder, CommonCommonTests, \
- populateCalendarsFrom
-from zope.interface.declarations import implements
</del><ins>+from txdav.common.datastore.test.util import (
+ CommonCommonTests, populateCalendarsFrom
+)
</ins><span class="cx">
</span><del>-class TestCalendarStoreDirectoryService(TestStoreDirectoryService):
</del><span class="cx">
</span><del>- implements(ICalendarStoreDirectoryService)
-
- def __init__(self):
- super(TestCalendarStoreDirectoryService, self).__init__()
- self.recordsByCUA = {}
-
-
- def recordWithCalendarUserAddress(self, cuaddr):
- return succeed(self.recordsByCUA.get(cuaddr))
-
-
- def addRecord(self, record):
- super(TestCalendarStoreDirectoryService, self).addRecord(record)
- for cuaddr in record.calendarUserAddresses:
- self.recordsByCUA[cuaddr] = record
-
-
- def removeRecord(self, uid):
- record = self.records[uid]
- del self.records[uid]
- for cuaddr in record.calendarUserAddresses:
- del self.recordsByCUA[cuaddr]
-
-
-
-class TestCalendarStoreDirectoryRecord(TestStoreDirectoryRecord):
-
- implements(ICalendarStoreDirectoryRecord)
-
- def __init__(
- self,
- uid,
- shortNames,
- fullName,
- calendarUserAddresses,
- cutype="INDIVIDUAL",
- thisServer=True,
- server=None,
- associatedAddress=None,
- streetAddress=None,
- geographicLocation=None
- ):
-
- super(TestCalendarStoreDirectoryRecord, self).__init__(
- uid, shortNames, fullName, thisServer, server,
- )
- self.calendarUserAddresses = calendarUserAddresses
- self.cutype = cutype
- self.associatedAddress = associatedAddress
- self.streetAddress = streetAddress
- self.geographicLocation = geographicLocation
-
-
- def canonicalCalendarUserAddress(self):
- """
- Return a CUA for this record, preferring in this order:
- urn:x-uid: form
- urn:uuid: form
- mailto: form
- /principals/__uids__/ form
- first in calendarUserAddresses list (sorted)
- """
-
- sortedCuas = sorted(self.calendarUserAddresses)
-
- for prefix in (
- "urn:x-uid:",
- "urn:uuid:",
- "mailto:",
- "/principals/__uids__/"
- ):
- for candidate in sortedCuas:
- if candidate.startswith(prefix):
- return candidate
-
- # fall back to using the first one
- return sortedCuas[0]
-
-
- def calendarsEnabled(self):
- return True
-
-
- def enabledAsOrganizer(self):
- if self.cutype == "INDIVIDUAL":
- return True
- elif self.recordType == "GROUP":
- return config.Scheduling.Options.AllowGroupAsOrganizer
- elif self.recordType == "ROOM":
- return config.Scheduling.Options.AllowLocationAsOrganizer
- elif self.recordType == "RESOURCE":
- return config.Scheduling.Options.AllowResourceAsOrganizer
- else:
- return False
-
-
- def getCUType(self):
- return self.cutype
-
-
- def canAutoSchedule(self, organizer):
- return succeed(False)
-
-
- def getAutoScheduleMode(self, organizer):
- return succeed("automatic")
-
-
- def isProxyFor(self, other):
- return succeed(False)
-
-
-
-def buildDirectory(homes=None):
-
- directory = TestCalendarStoreDirectoryService()
-
- # User accounts
- for ctr in range(1, 100):
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "user%02d" % (ctr,),
- ("user%02d" % (ctr,),),
- "User %02d" % (ctr,),
- frozenset((
- "urn:x-uid:user%02d" % (ctr,),
- "urn:uuid:user%02d" % (ctr,),
- "mailto:user%02d@example.com" % (ctr,),
- )),
- ))
-
- homes = set(homes) if homes is not None else set()
- homes.update((
- "home1",
- "home2",
- "home3",
- "home_attachments",
- "home_bad",
- "home_defaults",
- "home_no_splits",
- "home_provision1",
- "home_provision2",
- "home_splits",
- "home_splits_shared",
- "uid1",
- "uid2",
- "new-home",
- "xyzzy",
- ))
- for uid in homes:
- directory.addRecord(buildDirectoryRecord(uid))
-
- # Structured Locations
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "il1", ("il1",), "1 Infinite Loop", [],
- cutype="ROOM",
- geographicLocation="37.331741,-122.030333",
- streetAddress="1 Infinite Loop, Cupertino, CA 95014"
- ))
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "il2", ("il2",), "2 Infinite Loop", [],
- cutype="ROOM",
- geographicLocation="37.332633,-122.030502",
- streetAddress="2 Infinite Loop, Cupertino, CA 95014"
- ))
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "room1", ("room1",), "Conference Room One",
- frozenset(("urn:x-uid:room1",)),
- cutype="ROOM",
- associatedAddress="il1",
- ))
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "room2", ("room2",), "Conference Room Two",
- frozenset(("urn:x-uid:room2",)),
- cutype="ROOM",
- associatedAddress="il2",
- ))
-
- return directory
-
-
-
-def buildDirectoryRecord(uid):
- return TestCalendarStoreDirectoryRecord(
- uid,
- (uid,),
- uid.capitalize(),
- frozenset((
- "urn:x-uid:{0}".format(uid,),
- "urn:uuid:{0}".format(uid,),
- "mailto:{0}@example.com".format(uid,),
- )),
- )
-
-
-
-def buildCalendarStore(testCase, notifierFactory, directoryService=None, homes=None):
- if directoryService is None:
- directoryService = buildDirectory(homes=homes)
- return theStoreBuilder.buildStore(testCase, notifierFactory, directoryService)
-
-
-
</del><span class="cx"> class CommonStoreTests(CommonCommonTests, TestCase):
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(CommonStoreTests, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -277,10 +70,3 @@
</span><span class="cx"> },
</span><span class="cx"> },
</span><span class="cx"> }
</span><del>-
-
- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
</del></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoretestcommonpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/test/common.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/test/common.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/common.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -201,18 +201,7 @@
</span><span class="cx"> },
</span><span class="cx"> }
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Subclasses must override this to return an L{IAddressBookStore}
- provider which adheres to the structure detailed by
- L{CommonTests.requirements}. This attribute is a dict of dict of dicts;
- the outermost layer representing UIDs mapping to addressbook homes,
- then addressbook names mapping to addressbook collections, and finally
- addressbook object names mapping to addressbook object text.
- """
- raise NotImplementedError()
</del><span class="cx">
</span><del>-
</del><span class="cx"> def homeUnderTest(self, txn=None, name=None):
</span><span class="cx"> """
</span><span class="cx"> Get the addressbook home detailed by C{requirements['home1']}.
</span></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoretesttest_filepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/test/test_file.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/test/test_file.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/test_file.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> addressbookPath.parent().makedirs()
</span><span class="cx"> storePath.copyTo(addressbookPath)
</span><span class="cx">
</span><ins>+ test.counter = 0
</ins><span class="cx"> test.notifierFactory = StubNotifierFactory()
</span><span class="cx"> test.addressbookStore = AddressBookStore(storeRootPath, {"push": test.notifierFactory}, None)
</span><span class="cx"> test.txn = test.addressbookStore.newTransaction(test.id() + " (old)")
</span></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> from txdav.common.icommondatastore import NoSuchObjectResourceError
</span><span class="cx"> from txdav.common.datastore.sql import EADDRESSBOOKTYPE, CommonObjectResource
</span><span class="cx"> from txdav.common.datastore.sql_tables import _ABO_KIND_PERSON, _ABO_KIND_GROUP, schema
</span><del>-from txdav.common.datastore.test.util import buildStore, cleanStore
</del><ins>+from txdav.common.datastore.test.util import cleanStore
</ins><span class="cx"> from txdav.carddav.datastore.sql import AddressBook
</span><span class="cx">
</span><span class="cx"> from txdav.xml.rfc2518 import GETContentLanguage, ResourceType
</span><span class="lines">@@ -56,20 +56,10 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(AddressBookSQLStorageTests, self).setUp()
</span><del>- self._sqlStore = yield buildStore(
- self,
- self.notifierFactory,
- homes=(
- "home1",
- "home2",
- "home3",
- "home_bad",
- "home_empty",
- "homeNew",
- "new-home",
- "uid1",
- "uid2",
- "xyzzy",
</del><ins>+ yield self.buildStoreAndDirectory(
+ extraUids=(
+ u"home_empty",
+ u"homeNew",
</ins><span class="cx"> )
</span><span class="cx"> )
</span><span class="cx"> yield self.populate()
</span><span class="lines">@@ -96,13 +86,7 @@
</span><span class="cx"> self.notifierFactory.reset()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{AddressBookStore} for testing.
- """
- return self._sqlStore
</del><span class="cx">
</span><del>-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def assertAddressbooksSimilar(self, a, b, bAddressbookFilter=None):
</span><span class="cx"> """
</span><span class="lines">@@ -252,7 +236,7 @@
</span><span class="cx"> operations, that we do not block other reads of the table.
</span><span class="cx"> """
</span><span class="cx">
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx">
</span><span class="cx"> txn1 = addressbookStore.newTransaction()
</span><span class="cx"> txn2 = addressbookStore.newTransaction()
</span><span class="lines">@@ -304,7 +288,7 @@
</span><span class="cx"> Test that two concurrent attempts to PUT different address book object resources to the
</span><span class="cx"> same address book home does not cause a deadlock.
</span><span class="cx"> """
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx">
</span><span class="cx"> # Provision the home and addressbook now
</span><span class="cx"> txn = addressbookStore.newTransaction()
</span><span class="lines">@@ -373,7 +357,7 @@
</span><span class="cx"> C{INSERT} that violates a unique constraint.
</span><span class="cx"> """
</span><span class="cx">
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx">
</span><span class="cx"> txn1 = addressbookStore.newTransaction()
</span><span class="cx"> txn2 = addressbookStore.newTransaction()
</span><span class="lines">@@ -410,7 +394,7 @@
</span><span class="cx"> """
</span><span class="cx"> Test that kind property UID is stored correctly in database
</span><span class="cx"> """
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx">
</span><span class="cx"> # Provision the home and addressbook, one user and one group
</span><span class="cx"> txn = addressbookStore.newTransaction()
</span><span class="lines">@@ -456,7 +440,7 @@
</span><span class="cx"> """
</span><span class="cx"> Test that kind property vCard is stored correctly in database
</span><span class="cx"> """
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx">
</span><span class="cx"> # Provision the home and addressbook, one user and one group
</span><span class="cx"> txn = addressbookStore.newTransaction()
</span><span class="lines">@@ -547,7 +531,7 @@
</span><span class="cx"> """
</span><span class="cx"> Test that kind property vCard is stored correctly in database
</span><span class="cx"> """
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx"> cleanStore(self, addressbookStore)
</span><span class="cx">
</span><span class="cx"> # Provision the home and addressbook, one user and one group
</span><span class="lines">@@ -739,7 +723,7 @@
</span><span class="cx"> work concurrently without an exception.
</span><span class="cx"> """
</span><span class="cx">
</span><del>- addressbookStore = self._sqlStore
</del><ins>+ addressbookStore = self.store
</ins><span class="cx">
</span><span class="cx"> # Provision the home and addressbook now
</span><span class="cx"> txn = addressbookStore.newTransaction()
</span><span class="lines">@@ -799,7 +783,7 @@
</span><span class="cx"> self.assertTrue(resource._locked)
</span><span class="cx">
</span><span class="cx"> # Setup a new transaction to verify the lock and also verify wait behavior
</span><del>- newTxn = self._sqlStore.newTransaction()
</del><ins>+ newTxn = self.store.newTransaction()
</ins><span class="cx"> newResource = yield self.addressbookObjectUnderTest(txn=newTxn)
</span><span class="cx"> try:
</span><span class="cx"> yield newResource.lock(wait=False)
</span><span class="lines">@@ -818,7 +802,7 @@
</span><span class="cx"> self.assertTrue(resource._locked)
</span><span class="cx">
</span><span class="cx"> # Setup a new transaction to verify the lock but pass in an alternative txn directly
</span><del>- newTxn = self._sqlStore.newTransaction()
</del><ins>+ newTxn = self.store.newTransaction()
</ins><span class="cx">
</span><span class="cx"> # FIXME: not sure why, but without this statement here, this portion of the test fails in a funny way.
</span><span class="cx"> # Basically the query in the try block seems to execute twice, failing each time, one of which is caught,
</span></span></pre></div>
<a id="CalendarServertrunktxdavcarddavdatastoretesttest_sql_sharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/carddav/datastore/test/test_sql_sharing.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/carddav/datastore/test/test_sql_sharing.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/test_sql_sharing.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx">
</span><span class="cx"> from twistedcaldav.vcard import Component as VCard, Component
</span><span class="cx"> from twext.python.clsprop import classproperty
</span><del>-from txdav.common.datastore.test.util import CommonCommonTests, buildStore
</del><ins>+from txdav.common.datastore.test.util import CommonCommonTests
</ins><span class="cx"> from txdav.common.datastore.sql_tables import _BIND_MODE_READ, \
</span><span class="cx"> _BIND_STATUS_INVITED, _BIND_MODE_DIRECT, _BIND_STATUS_ACCEPTED, \
</span><span class="cx"> _BIND_MODE_WRITE
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(BaseSharingTests, self).setUp()
</span><del>- self._sqlStore = yield buildStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -136,13 +136,6 @@
</span><span class="cx"> group2_children = ["group2.vcf", "card1.vcf", "card3.vcf", ]
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def _createShare(self, mode=_BIND_MODE_READ):
</span><span class="cx"> inviteUID = yield self._inviteShare(mode)
</span><span class="lines">@@ -1209,8 +1202,8 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> # Create first events in different addressbook homes
</span><del>- txn1 = self._sqlStore.newTransaction()
- txn2 = self._sqlStore.newTransaction()
</del><ins>+ txn1 = self.store.newTransaction()
+ txn2 = self.store.newTransaction()
</ins><span class="cx">
</span><span class="cx"> addressbook_uid1_in_txn1 = yield self.addressbookUnderTest(txn1, "addressbook", "user01")
</span><span class="cx"> addressbook_uid2_in_txn2 = yield self.addressbookUnderTest(txn2, "addressbook", "user02")
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingresourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/resource.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/resource.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/podding/resource.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -29,12 +29,12 @@
</span><span class="cx"> deliverSchedulePrivilegeSet
</span><span class="cx">
</span><span class="cx"> from txdav.xml import element as davxml
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers
</del><span class="cx"> from txdav.common.datastore.podding.conduit import FailedCrossPodRequestError
</span><span class="cx">
</span><span class="cx"> import base64
</span><span class="cx"> import json
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class ConduitResource(ReadOnlyNoCopyResourceMixIn, DAVResourceWithoutChildrenMixin, DAVResource):
</span><span class="cx"> """
</span><span class="cx"> Podding cross-pod RPC conduit resource.
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> # Check shared secret
</span><del>- if not Servers.getThisServer().checkSharedSecret(request.headers):
</del><ins>+ if not self.store.directoryService().serversDB.getThisServer().checkSharedSecret(request.headers):
</ins><span class="cx"> self.log.error("Invalid shared secret header in cross-pod request")
</span><span class="cx"> raise HTTPError(StatusResponse(responsecode.FORBIDDEN, "Not authorized to make this request"))
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingtesttest_conduitpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/test/test_conduit.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/test/test_conduit.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/podding/test/test_conduit.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -31,11 +31,9 @@
</span><span class="cx">
</span><span class="cx"> from txdav.caldav.datastore.query.filter import Filter
</span><span class="cx"> from txdav.caldav.datastore.scheduling.freebusy import generateFreeBusyInfo
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers, Server
</del><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import ServersDB, Server
</ins><span class="cx"> from txdav.caldav.datastore.sql import ManagedAttachment
</span><span class="cx"> from txdav.caldav.datastore.test.common import CaptureProtocol
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore, \
- TestCalendarStoreDirectoryRecord
</del><span class="cx"> from txdav.common.datastore.podding.conduit import PoddingConduit, \
</span><span class="cx"> FailedCrossPodRequestError
</span><span class="cx"> from txdav.common.datastore.podding.resource import ConduitResource
</span><span class="lines">@@ -63,36 +61,19 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(TestConduit, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
- self.directory = self._sqlCalendarStore.directoryService()
</del><span class="cx">
</span><del>- for ctr in range(1, 100):
- self.directory.addRecord(TestCalendarStoreDirectoryRecord(
- "puser{:02d}".format(ctr),
- ("puser{:02d}".format(ctr),),
- "Puser {:02d}".format(ctr),
- frozenset((
- "urn:uuid:puser{:02d}".format(ctr),
- "mailto:puser{:02d}@example.com".format(ctr),
- )),
- thisServer=False,
- ))
</del><ins>+ serversDB = ServersDB()
+ serversDB.addServer(Server("A", "http://127.0.0.1", "A", True))
+ serversDB.addServer(Server("B", "http://127.0.0.2", "B", False))
</ins><span class="cx">
</span><ins>+ yield self.buildStoreAndDirectory(serversDB=serversDB)
+
</ins><span class="cx"> self.site.resource.putChild("conduit", ConduitResource(self.site.resource, self.storeUnderTest()))
</span><span class="cx">
</span><del>- self.thisServer = Server("A", "http://127.0.0.1", "A", True)
- Servers.addServer(self.thisServer)
-
</del><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlCalendarStore
</del><span class="cx">
</span><del>-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def populate(self):
</span><span class="cx"> yield populateCalendarsFrom(self.requirements, self.storeUnderTest())
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingtesttest_external_homepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/test/test_external_home.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/test/test_external_home.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/podding/test/test_external_home.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -16,10 +16,9 @@
</span><span class="cx">
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks
</span><span class="cx">
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers, \
- Server
-from txdav.caldav.datastore.test.util import buildCalendarStore, \
- TestCalendarStoreDirectoryRecord
</del><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import (
+ ServersDB, Server
+)
</ins><span class="cx"> from txdav.common.datastore.podding.resource import ConduitResource
</span><span class="cx"> from txdav.common.datastore.sql_tables import _HOME_STATUS_NORMAL, \
</span><span class="cx"> _HOME_STATUS_EXTERNAL
</span><span class="lines">@@ -34,34 +33,16 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(ExternalHome, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
- self.directory = self._sqlCalendarStore.directoryService()
</del><span class="cx">
</span><del>- for ctr in range(1, 100):
- self.directory.addRecord(TestCalendarStoreDirectoryRecord(
- "puser{:02d}".format(ctr),
- ("puser{:02d}".format(ctr),),
- "Puser {:02d}".format(ctr),
- frozenset((
- "urn:uuid:puser{:02d}".format(ctr),
- "mailto:puser{:02d}@example.com".format(ctr),
- )),
- thisServer=False,
- ))
</del><ins>+ serversDB = ServersDB()
+ serversDB.addServer(Server("A", "http://127.0.0.1", "A", True))
+ serversDB.addServer(Server("B", "http://127.0.0.2", "B", False))
</ins><span class="cx">
</span><ins>+ yield self.buildStoreAndDirectory(serversDB=serversDB)
+
</ins><span class="cx"> self.site.resource.putChild("conduit", ConduitResource(self.site.resource, self.storeUnderTest()))
</span><span class="cx">
</span><del>- self.thisServer = Server("A", "http://127.0.0.1", "A", True)
- Servers.addServer(self.thisServer)
</del><span class="cx">
</span><del>-
- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_validNormalHome(self):
</span><span class="cx"> """
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingtesttest_resourcepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/test/test_resource.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/test/test_resource.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/podding/test/test_resource.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -23,8 +23,9 @@
</span><span class="cx">
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, succeed
</span><span class="cx">
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers, Server
-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import (
+ ServersDB, Server
+)
</ins><span class="cx"> from txdav.common.datastore.podding.resource import ConduitResource
</span><span class="cx"> from txdav.common.datastore.test.util import populateCalendarsFrom, CommonCommonTests
</span><span class="cx"> import json
</span><span class="lines">@@ -45,24 +46,17 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(ConduitPOST, self).setUp()
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory)
- self.directory = self._sqlCalendarStore.directoryService()
</del><span class="cx">
</span><del>- self.site.resource.putChild("conduit", ConduitResource(self.site.resource, self.storeUnderTest()))
-
</del><ins>+ serversDB = ServersDB()
</ins><span class="cx"> self.thisServer = Server("A", "http://127.0.0.1", "A", True)
</span><del>- Servers.addServer(self.thisServer)
</del><ins>+ serversDB.addServer(self.thisServer)
+ yield self.buildStoreAndDirectory(serversDB=serversDB)
</ins><span class="cx">
</span><ins>+ self.site.resource.putChild("conduit", ConduitResource(self.site.resource, self.storeUnderTest()))
+
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlCalendarStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def populate(self):
</span><span class="cx"> yield populateCalendarsFrom(self.requirements, self.storeUnderTest())
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastorepoddingtestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/podding/test/util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/podding/test/util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/podding/test/util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -16,14 +16,14 @@
</span><span class="cx">
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue
</span><span class="cx">
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Server, \
- Servers
-from txdav.caldav.datastore.test.util import \
- TestCalendarStoreDirectoryRecord, TestCalendarStoreDirectoryService
</del><ins>+from txdav.caldav.datastore.scheduling.ischedule.localservers import (
+ Server, ServersDB
+)
</ins><span class="cx"> from txdav.common.datastore.podding.conduit import PoddingConduit
</span><span class="cx"> from txdav.common.datastore.sql_tables import _BIND_MODE_WRITE
</span><del>-from txdav.common.datastore.test.util import CommonCommonTests, SQLStoreBuilder,\
- theStoreBuilder
</del><ins>+from txdav.common.datastore.test.util import (
+ CommonCommonTests, SQLStoreBuilder, buildTestDirectory
+)
</ins><span class="cx">
</span><span class="cx"> import txweb2.dav.test.util
</span><span class="cx">
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx">
</span><span class="cx"> import json
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class FakeConduitRequest(object):
</span><span class="cx"> """
</span><span class="cx"> A conduit request that sends messages internally rather than using HTTP
</span><span class="lines">@@ -103,37 +104,54 @@
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(MultiStoreConduitTest, self).setUp()
</span><span class="cx">
</span><del>- server1 = Server("A", "http://127.0.0.1:8008", "A", True)
- Servers.addServer(server1)
</del><ins>+ # Store 1
+ serversDB1 = ServersDB()
+ server1a = Server("A", "http://127.0.0.1:8008", "A", True)
+ serversDB1.addServer(server1a)
+ server1b = Server("B", "http://127.0.0.1:8108", "B", False)
+ serversDB1.addServer(server1b)
+ yield self.buildStoreAndDirectory(serversDB=serversDB1)
+ self.store.queryCacher = None # Cannot use query caching
+ self.store.conduit = self.makeConduit(self.store)
</ins><span class="cx">
</span><del>- server2 = Server("B", "http://127.0.0.1:8108", "B", False)
- Servers.addServer(server2)
</del><ins>+ # Store 2
+ serversDB2 = ServersDB()
+ server2a = Server("A", "http://127.0.0.1:8008", "A", False)
+ serversDB2.addServer(server2a)
+ server2b = Server("B", "http://127.0.0.1:8108", "B", True)
+ serversDB2.addServer(server2b)
</ins><span class="cx">
</span><del>- self._sqlCalendarStore1 = yield self.makeStore(theStoreBuilder, True, server1, server2)
- self._sqlCalendarStore2 = yield self.makeStore(self.theStoreBuilder2, False, server1, server2)
</del><ins>+ self.store2 = yield self.buildStore(self.theStoreBuilder2)
+ directory2 = buildTestDirectory(
+ self.store2, self.mktemp(), serversDB=serversDB2
+ )
</ins><span class="cx">
</span><del>- FakeConduitRequest.addServerStore(server1, self._sqlCalendarStore1)
- FakeConduitRequest.addServerStore(server2, self._sqlCalendarStore2)
</del><ins>+ self.store2.setDirectoryService(directory2)
+ self.store2.queryCacher = None # Cannot use query caching
+ self.store2.conduit = self.makeConduit(self.store2)
</ins><span class="cx">
</span><ins>+ FakeConduitRequest.addServerStore(server1a, self.store)
+ FakeConduitRequest.addServerStore(server2b, self.store2)
</ins><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlCalendarStore1
</del><span class="cx">
</span><span class="cx">
</span><ins>+ def configure(self):
+ super(MultiStoreConduitTest, self).configure()
+ self.config.Servers.Enabled = True
+
+
</ins><span class="cx"> def otherStoreUnderTest(self):
</span><span class="cx"> """
</span><span class="cx"> Return a store for testing.
</span><span class="cx"> """
</span><del>- return self._sqlCalendarStore2
</del><ins>+ return self.store2
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> def newOtherTransaction(self):
</span><span class="cx"> assert self.otherTransaction is None
</span><span class="cx"> store2 = self.otherStoreUnderTest()
</span><span class="cx"> txn = store2.newTransaction()
</span><ins>+
</ins><span class="cx"> @inlineCallbacks
</span><span class="cx"> def maybeCommitThis():
</span><span class="cx"> try:
</span><span class="lines">@@ -165,50 +183,7 @@
</span><span class="cx"> self.otherTransaction = None
</span><span class="cx">
</span><span class="cx">
</span><del>- @inlineCallbacks
- def makeStore(self, builder, internal, server1, server2):
</del><span class="cx">
</span><del>- directory = self.makeDirectory(internal, server1, server2)
- store = yield builder.buildStore(self, self.notifierFactory, directory)
- store.queryCacher = None # Cannot use query caching
- store.conduit = self.makeConduit(store)
- returnValue(store)
-
-
- def makeDirectory(self, internal, server1, server2):
-
- directory = TestCalendarStoreDirectoryService()
-
- # User accounts
- for ctr in range(1, 100):
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "user%02d" % (ctr,),
- ("user%02d" % (ctr,),),
- "User %02d" % (ctr,),
- frozenset((
- "urn:uuid:user%02d" % (ctr,),
- "mailto:user%02d@example.com" % (ctr,),
- )),
- thisServer=internal,
- server=server1
- ))
-
- for ctr in range(1, 100):
- directory.addRecord(TestCalendarStoreDirectoryRecord(
- "puser{:02d}".format(ctr),
- ("puser{:02d}".format(ctr),),
- "Puser {:02d}".format(ctr),
- frozenset((
- "urn:uuid:puser{:02d}".format(ctr),
- "mailto:puser{:02d}@example.com".format(ctr),
- )),
- thisServer=not internal,
- server=server2
- ))
-
- return directory
-
-
</del><span class="cx"> def makeConduit(self, store):
</span><span class="cx"> conduit = PoddingConduit(store)
</span><span class="cx"> conduit.conduitRequestClass = FakeConduitRequest
</span><span class="lines">@@ -223,6 +198,7 @@
</span><span class="cx"> yield calendar.inviteUserToShare(shareeGUID, _BIND_MODE_WRITE, "shared", shareName="shared-calendar")
</span><span class="cx"> yield self.commit()
</span><span class="cx">
</span><ins>+ # ACK: home2 is None
</ins><span class="cx"> home2 = yield self.homeUnderTest(txn=self.newOtherTransaction(), name=shareeGUID)
</span><span class="cx"> yield home2.acceptShare("shared-calendar")
</span><span class="cx"> yield self.otherCommit()
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestaccountsaccountsxml"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/txdav/common/datastore/test/accounts/accounts.xml (0 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/accounts/accounts.xml         (rev 0)
+++ CalendarServer/trunk/txdav/common/datastore/test/accounts/accounts.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -0,0 +1,1829 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2006-2014 Apple Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+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 "AS IS" 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.
+ -->
+
+<!DOCTYPE accounts SYSTEM "accounts.dtd">
+
+<directory realm="Test Realm">
+ <record type="user">
+ <uid>D11F03A0-97EA-48AF-9A6C-FAC7F3975766</uid>
+ <short-name>admin</short-name>
+ <password>nimda</password>
+ <full-name>Administrators</full-name>
+ </record>
+ <record type="user">
+ <uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
+ <guid>6423F94A-6B76-4A3A-815B-D52CFD77935D</guid>
+ <short-name>wsanchez</short-name>
+ <password>zehcnasw</password>
+ <full-name>Wilfredo Sanchez</full-name>
+ <email>wsanchez@example.com</email>
+ </record>
+ <record type="user">
+ <uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
+ <guid>5A985493-EE2C-4665-94CF-4DFEA3A89500</guid>
+ <short-name>cdaboo</short-name>
+ <password>oobadc</password>
+ <full-name>Cyrus Daboo</full-name>
+ <email>cdaboo@example.com</email>
+ </record>
+ <record type="user">
+ <uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</uid>
+ <short-name>lecroy</short-name>
+ <password>yorcel</password>
+ <full-name>Chris Lecroy</full-name>
+ <email>lecroy@example.com</email>
+ </record>
+ <record type="user">
+ <uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</uid>
+ <short-name>dreid</short-name>
+ <password>dierd</password>
+ <full-name>David Reid</full-name>
+ <email>dreid@example.com</email>
+ </record>
+ <record type="user">
+ <uid>8E04787E-336D-41ED-A70B-D233AD0DCE6F</uid>
+ <guid>8E04787E-336D-41ED-A70B-D233AD0DCE6F</guid>
+ <short-name>doublequotes</short-name>
+ <password>setouqelbuod</password>
+ <full-name>Double "quotey" Quotes</full-name>
+ <email>doublequotes@example.com</email>
+ </record>
+ <record type="user">
+ <uid>37DB0C90-4DB1-4932-BC69-3DAB66F374F5</uid>
+ <guid>37DB0C90-4DB1-4932-BC69-3DAB66F374F5</guid>
+ <short-name>purgeuser</short-name>
+ <password>purgeuser</password>
+ <full-name>Purge User</full-name>
+ <email>purgeuser@example.com</email>
+ </record>
+ <record type="user">
+ <uid>uid1</uid>
+ <short-name>uid1</short-name>
+ <password>uid1</password>
+ <full-name>uid One</full-name>
+ <email>uid1@example.com</email>
+ </record>
+ <record type="user">
+ <uid>uid2</uid>
+ <short-name>uid2</short-name>
+ <password>uid2</password>
+ <full-name>uid Two</full-name>
+ <email>uid2@example.com</email>
+ </record>
+
+ <record type="user">
+ <uid>home1</uid>
+ <short-name>home1</short-name>
+ <password>home1</password>
+ <full-name>Home One</full-name>
+ <email>home1@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home2</uid>
+ <short-name>home2</short-name>
+ <password>home2</password>
+ <full-name>Home Two</full-name>
+ <email>home2@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home3</uid>
+ <short-name>home3</short-name>
+ <password>home3</password>
+ <full-name>Home Three</full-name>
+ <email>home3@example.com</email>
+ </record>
+
+ <record type="user">
+ <uid>home_splits</uid>
+ <short-name>home_splits</short-name>
+ <password>home_splits</password>
+ <full-name>Home Splits</full-name>
+ <email>home_splits@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home_no_splits</uid>
+ <short-name>home_no_splits</short-name>
+ <password>home_no_splits</password>
+ <full-name>Home NoSplits</full-name>
+ <email>home_no_splits@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home_defaults</uid>
+ <short-name>home_defaults</short-name>
+ <password>home_defaults</password>
+ <full-name>Home Defaults</full-name>
+ <email>home_defaults@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home_splits_shared</uid>
+ <short-name>home_splits_shared</short-name>
+ <password>home_splits_shared</password>
+ <full-name>Home SplitsShared</full-name>
+ <email>home_splits_shared@example.com</email>
+ </record>
+ <record type="user">
+ <uid>new-home</uid>
+ <short-name>new-home</short-name>
+ <password>new-home</password>
+ <full-name>New Home</full-name>
+ <email>new-home@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home_provision1</uid>
+ <short-name>home_provision1</short-name>
+ <password>home_provision1</password>
+ <full-name>Home Provision1</full-name>
+ <email>home_provision1@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home_provision2</uid>
+ <short-name>home_provision2</short-name>
+ <password>home_provision2</password>
+ <full-name>Home Provision2</full-name>
+ <email>home_provision2@example.com</email>
+ </record>
+ <record type="user">
+ <uid>home_attachments</uid>
+ <short-name>home_attachments</short-name>
+ <password>home_attachments</password>
+ <full-name>Home Attachments</full-name>
+ <email>home_attachments@example.com</email>
+ </record>
+ <record type="user">
+ <uid>xyzzy</uid>
+ <short-name>xyzzy</short-name>
+ <password>xyzzy</password>
+ <full-name>xyzzy</full-name>
+ <email>xyzzy@example.com</email>
+ </record>
+
+ <record type="user">
+ <uid>543D28BA-F74F-4D5F-9243-B3E3A61171E5</uid>
+ <short-name>nocalendar</short-name>
+ <password>radnelacon</password>
+ <full-name>No Calendar</full-name>
+ <email>nocalendar@example.com</email>
+ </record>
+ <record type="user">
+ <uid>7423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
+ <short-name>usera</short-name>
+ <password>a</password>
+ <full-name>a</full-name>
+ <email>a@example.com</email>
+ </record>
+ <record type="user">
+ <uid>8A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
+ <short-name>userb</short-name>
+ <password>b</password>
+ <full-name>b</full-name>
+ <email>b@example.com</email>
+ </record>
+ <record type="user">
+ <uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD2</uid>
+ <short-name>userc</short-name>
+ <password>c</password>
+ <full-name>c</full-name>
+ <email>c@example.com</email>
+ </record>
+ <record type="user">
+ <uid>9E1FFAC4-3CCD-45A1-8272-D161C92D2EEE</uid>
+ <short-name>usercalonly</short-name>
+ <password>a</password>
+ <full-name>a calonly</full-name>
+ <email>a-calonly@example.com</email>
+ </record>
+ <record type="user">
+ <uid>7678EC8A-A069-4E82-9066-7279C6718507</uid>
+ <short-name>useradbkonly</short-name>
+ <password>a</password>
+ <full-name>a adbkonly</full-name>
+ <email>a-adbkonly@example.com</email>
+ </record>
+ <record type="user">
+ <uid>320B73A1-46E2-4180-9563-782DFDBE1F63</uid>
+ <short-name>nonascii</short-name>
+ <short-name>nonascii佐藤</short-name>
+ <password>a</password>
+ <full-name>佐藤佐藤佐藤</full-name>
+ <email>nonascii@example.com</email>
+ </record>
+ <record type="user">
+ <uid>FC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
+ <short-name>delegator</short-name>
+ <password>a</password>
+ <full-name>Calendar Delegator</full-name>
+ <email>calendardelegator@example.com</email>
+ </record>
+ <record type="user">
+ <uid>EC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
+ <short-name>occasionaldelegate</short-name>
+ <password>a</password>
+ <full-name>Occasional Delegate</full-name>
+ <email>occasional@example.com</email>
+ </record>
+ <record type="user">
+ <uid>46D9D716-CBEE-490F-907A-66FA6C3767FF</uid>
+ <short-name>delegateviagroup</short-name>
+ <password>a</password>
+ <full-name>Delegate Via Group</full-name>
+ <email>delegateviagroup@example.com</email>
+ </record>
+ <record type="group">
+ <uid>00599DAF-3E75-42DD-9DB7-52617E79943F</uid>
+ <short-name>delegategroup</short-name>
+ <full-name>Delegate Group</full-name>
+ <member-uid>46D9D716-CBEE-490F-907A-66FA6C3767FF</member-uid>
+ </record>
+
+ <record type="user">
+ <uid>__wsanchez1__</uid>
+ <short-name>wsanchez1</short-name>
+ <short-name>wilfredo_sanchez</short-name>
+ <password>zehcnasw</password>
+ <full-name>Wilfredo Sanchez</full-name>
+ <email>wsanchez@bitbucket.calendarserver.org</email>
+ <email>wsanchez@devnull.twistedmatrix.com</email>
+ </record>
+
+ <record type="user">
+ <uid>__glyph1__</uid>
+ <short-name>glyph1</short-name>
+ <password>hpylg</password>
+ <full-name>Glyph Lefkowitz</full-name>
+ <email>glyph@bitbucket.calendarserver.org</email>
+ <email>glyph@devnull.twistedmatrix.com</email>
+ </record>
+
+ <record type="user">
+ <uid>__sagen1__</uid>
+ <short-name>sagen</short-name>
+ <short-name>sagen1</short-name>
+ <password>negas</password>
+ <full-name>Morgen Sagen</full-name>
+ <email>sagen@bitbucket.calendarserver.org</email>
+ </record>
+
+ <record type="user">
+ <uid>__cdaboo1__</uid>
+ <short-name>cdaboo1</short-name>
+ <password>suryc</password>
+ <full-name>Cyrus Daboo</full-name>
+ <email>cdaboo@bitbucket.calendarserver.org</email>
+ </record>
+
+ <record type="user">
+ <uid>__dre1__</uid>
+ <short-name>dre1</short-name>
+ <short-name>dre</short-name>
+ <password>erd</password>
+ <full-name>Andre LaBranche</full-name>
+ <email>dre@bitbucket.calendarserver.org</email>
+ </record>
+
+ <record type="group">
+ <uid>__top_group_1__</uid>
+ <short-name>top-group-1</short-name>
+ <full-name>Top Group 1</full-name>
+ <email>topgroup1@example.com</email>
+ <member-uid>__wsanchez1__</member-uid>
+ <member-uid>__glyph1__</member-uid>
+ <member-uid>__sub_group_1__</member-uid>
+ </record>
+
+ <record type="group">
+ <uid>__sub_group_1__</uid>
+ <short-name>sub-group-1</short-name>
+ <full-name>Sub Group 1</full-name>
+ <email>subgroup1@example.com</email>
+ <member-uid>__sagen1__</member-uid>
+ <member-uid>__cdaboo1__</member-uid>
+ </record>
+
+
+ <record type="group">
+ <uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</uid>
+ <short-name>managers</short-name>
+ <password>managers</password>
+ <full-name>Managers</full-name>
+ <member-uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</member-uid>
+ </record>
+ <record type="group">
+ <uid>admin</uid>
+ <short-name>admin</short-name>
+ <password>admin</password>
+ <full-name>Administrators</full-name>
+ <member-uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</member-uid>
+ </record>
+ <record type="group">
+ <uid>grunts</uid>
+ <short-name>grunts</short-name>
+ <password>grunts</password>
+ <full-name>We do all the work</full-name>
+ <member-uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</member-uid>
+ <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
+ <member-uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</member-uid>
+ </record>
+ <record type="group">
+ <uid>right_coast</uid>
+ <short-name>right_coast</short-name>
+ <password>right_coast</password>
+ <full-name>East Coast</full-name>
+ <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
+ </record>
+ <record type="group">
+ <uid>left_coast</uid>
+ <short-name>left_coast</short-name>
+ <password>left_coast</password>
+ <full-name>West Coast</full-name>
+ <member-uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</member-uid>
+ <member-uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</member-uid>
+ <member-uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</member-uid>
+ </record>
+ <record type="group">
+ <uid>both_coasts</uid>
+ <short-name>both_coasts</short-name>
+ <password>both_coasts</password>
+ <full-name>Both Coasts</full-name>
+ <member-uid>right_coast</member-uid>
+ <member-uid>left_coast</member-uid>
+ </record>
+ <record type="group">
+ <uid>recursive1_coasts</uid>
+ <short-name>recursive1_coasts</short-name>
+ <password>recursive1_coasts</password>
+ <full-name>Recursive1 Coasts</full-name>
+ <member-uid>recursive2_coasts</member-uid>
+ <member-uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</member-uid>
+ </record>
+ <record type="group">
+ <uid>recursive2_coasts</uid>
+ <short-name>recursive2_coasts</short-name>
+ <password>recursive2_coasts</password>
+ <full-name>Recursive2 Coasts</full-name>
+ <member-uid>recursive1_coasts</member-uid>
+ <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
+ </record>
+ <record type="group">
+ <uid>non_calendar_group</uid>
+ <short-name>non_calendar_group</short-name>
+ <password>non_calendar_group</password>
+ <full-name>Non-calendar group</full-name>
+ <member-uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</member-uid>
+ <member-uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</member-uid>
+ </record>
+
+ <!-- Calverify test records -->
+
+ <record type="user">
+ <uid>D46F3D71-04B7-43C2-A7B6-6F92F92E61D0</uid>
+ <guid>D46F3D71-04B7-43C2-A7B6-6F92F92E61D0</guid>
+ <short-name>example1</short-name>
+ <password>example</password>
+ <full-name>Example User1</full-name>
+ <email>example1@example.com</email>
+ </record>
+
+ <record type="user">
+ <uid>47B16BB4-DB5F-4BF6-85FE-A7DA54230F92</uid>
+ <guid>47B16BB4-DB5F-4BF6-85FE-A7DA54230F92</guid>
+ <short-name>example2</short-name>
+ <password>example</password>
+ <full-name>Example User2</full-name>
+ <email>example2@example.com</email>
+ </record>
+
+ <record type="user">
+ <uid>AC478592-7783-44D1-B2AE-52359B4E8415</uid>
+ <guid>AC478592-7783-44D1-B2AE-52359B4E8415</guid>
+ <short-name>example3</short-name>
+ <password>example</password>
+ <full-name>Example User3</full-name>
+ <email>example3@example.com</email>
+ </record>
+
+ <record type="user">
+ <uid>A89E3A97-1658-4E45-A185-479F3E49D446</uid>
+ <guid>A89E3A97-1658-4E45-A185-479F3E49D446</guid>
+ <short-name>example4</short-name>
+ <password>example</password>
+ <full-name>Example User4</full-name>
+ <email>example4@example.com</email>
+ </record>
+
+
+<record type="user">
+ <uid>user01</uid>
+ <short-name>user01</short-name>
+ <password>user01</password>
+ <full-name>User 01</full-name>
+ <email>user01@example.com</email>
+</record>
+<record type="user">
+ <uid>user02</uid>
+ <short-name>user02</short-name>
+ <password>user02</password>
+ <full-name>User 02</full-name>
+ <email>user02@example.com</email>
+</record>
+<record type="user">
+ <uid>user03</uid>
+ <short-name>user03</short-name>
+ <password>user03</password>
+ <full-name>User 03</full-name>
+ <email>user03@example.com</email>
+</record>
+<record type="user">
+ <uid>user04</uid>
+ <short-name>user04</short-name>
+ <password>user04</password>
+ <full-name>User 04</full-name>
+ <email>user04@example.com</email>
+</record>
+<record type="user">
+ <uid>user05</uid>
+ <short-name>user05</short-name>
+ <password>user05</password>
+ <full-name>User 05</full-name>
+ <email>user05@example.com</email>
+</record>
+<record type="user">
+ <uid>user06</uid>
+ <short-name>user06</short-name>
+ <password>user06</password>
+ <full-name>User 06</full-name>
+ <email>user06@example.com</email>
+</record>
+<record type="user">
+ <uid>user07</uid>
+ <short-name>user07</short-name>
+ <password>user07</password>
+ <full-name>User 07</full-name>
+ <email>user07@example.com</email>
+</record>
+<record type="user">
+ <uid>user08</uid>
+ <short-name>user08</short-name>
+ <password>user08</password>
+ <full-name>User 08</full-name>
+ <email>user08@example.com</email>
+</record>
+<record type="user">
+ <uid>user09</uid>
+ <short-name>user09</short-name>
+ <password>user09</password>
+ <full-name>User 09</full-name>
+ <email>user09@example.com</email>
+</record>
+<record type="user">
+ <uid>user10</uid>
+ <short-name>user10</short-name>
+ <password>user10</password>
+ <full-name>User 10</full-name>
+ <email>user10@example.com</email>
+</record>
+<record type="user">
+ <uid>user11</uid>
+ <short-name>user11</short-name>
+ <password>user11</password>
+ <full-name>User 11</full-name>
+ <email>user11@example.com</email>
+</record>
+<record type="user">
+ <uid>user12</uid>
+ <short-name>user12</short-name>
+ <password>user12</password>
+ <full-name>User 12</full-name>
+ <email>user12@example.com</email>
+</record>
+<record type="user">
+ <uid>user13</uid>
+ <short-name>user13</short-name>
+ <password>user13</password>
+ <full-name>User 13</full-name>
+ <email>user13@example.com</email>
+</record>
+<record type="user">
+ <uid>user14</uid>
+ <short-name>user14</short-name>
+ <password>user14</password>
+ <full-name>User 14</full-name>
+ <email>user14@example.com</email>
+</record>
+<record type="user">
+ <uid>user15</uid>
+ <short-name>user15</short-name>
+ <password>user15</password>
+ <full-name>User 15</full-name>
+ <email>user15@example.com</email>
+</record>
+<record type="user">
+ <uid>user16</uid>
+ <short-name>user16</short-name>
+ <password>user16</password>
+ <full-name>User 16</full-name>
+ <email>user16@example.com</email>
+</record>
+<record type="user">
+ <uid>user17</uid>
+ <short-name>user17</short-name>
+ <password>user17</password>
+ <full-name>User 17</full-name>
+ <email>user17@example.com</email>
+</record>
+<record type="user">
+ <uid>user18</uid>
+ <short-name>user18</short-name>
+ <password>user18</password>
+ <full-name>User 18</full-name>
+ <email>user18@example.com</email>
+</record>
+<record type="user">
+ <uid>user19</uid>
+ <short-name>user19</short-name>
+ <password>user19</password>
+ <full-name>User 19</full-name>
+ <email>user19@example.com</email>
+</record>
+<record type="user">
+ <uid>user20</uid>
+ <short-name>user20</short-name>
+ <password>user20</password>
+ <full-name>User 20</full-name>
+ <email>user20@example.com</email>
+</record>
+<record type="user">
+ <uid>user21</uid>
+ <short-name>user21</short-name>
+ <password>user21</password>
+ <full-name>User 21</full-name>
+ <email>user21@example.com</email>
+</record>
+<record type="user">
+ <uid>user22</uid>
+ <short-name>user22</short-name>
+ <password>user22</password>
+ <full-name>User 22</full-name>
+ <email>user22@example.com</email>
+</record>
+<record type="user">
+ <uid>user23</uid>
+ <short-name>user23</short-name>
+ <password>user23</password>
+ <full-name>User 23</full-name>
+ <email>user23@example.com</email>
+</record>
+<record type="user">
+ <uid>user24</uid>
+ <short-name>user24</short-name>
+ <password>user24</password>
+ <full-name>User 24</full-name>
+ <email>user24@example.com</email>
+</record>
+<record type="user">
+ <uid>user25</uid>
+ <short-name>user25</short-name>
+ <password>user25</password>
+ <full-name>User 25</full-name>
+ <email>user25@example.com</email>
+</record>
+<record type="user">
+ <uid>user26</uid>
+ <short-name>user26</short-name>
+ <password>user26</password>
+ <full-name>User 26</full-name>
+ <email>user26@example.com</email>
+</record>
+<record type="user">
+ <uid>user27</uid>
+ <short-name>user27</short-name>
+ <password>user27</password>
+ <full-name>User 27</full-name>
+ <email>user27@example.com</email>
+</record>
+<record type="user">
+ <uid>user28</uid>
+ <short-name>user28</short-name>
+ <password>user28</password>
+ <full-name>User 28</full-name>
+ <email>user28@example.com</email>
+</record>
+<record type="user">
+ <uid>user29</uid>
+ <short-name>user29</short-name>
+ <password>user29</password>
+ <full-name>User 29</full-name>
+ <email>user29@example.com</email>
+</record>
+<record type="user">
+ <uid>user30</uid>
+ <short-name>user30</short-name>
+ <password>user30</password>
+ <full-name>User 30</full-name>
+ <email>user30@example.com</email>
+</record>
+<record type="user">
+ <uid>user31</uid>
+ <short-name>user31</short-name>
+ <password>user31</password>
+ <full-name>User 31</full-name>
+ <email>user31@example.com</email>
+</record>
+<record type="user">
+ <uid>user32</uid>
+ <short-name>user32</short-name>
+ <password>user32</password>
+ <full-name>User 32</full-name>
+ <email>user32@example.com</email>
+</record>
+<record type="user">
+ <uid>user33</uid>
+ <short-name>user33</short-name>
+ <password>user33</password>
+ <full-name>User 33</full-name>
+ <email>user33@example.com</email>
+</record>
+<record type="user">
+ <uid>user34</uid>
+ <short-name>user34</short-name>
+ <password>user34</password>
+ <full-name>User 34</full-name>
+ <email>user34@example.com</email>
+</record>
+<record type="user">
+ <uid>user35</uid>
+ <short-name>user35</short-name>
+ <password>user35</password>
+ <full-name>User 35</full-name>
+ <email>user35@example.com</email>
+</record>
+<record type="user">
+ <uid>user36</uid>
+ <short-name>user36</short-name>
+ <password>user36</password>
+ <full-name>User 36</full-name>
+ <email>user36@example.com</email>
+</record>
+<record type="user">
+ <uid>user37</uid>
+ <short-name>user37</short-name>
+ <password>user37</password>
+ <full-name>User 37</full-name>
+ <email>user37@example.com</email>
+</record>
+<record type="user">
+ <uid>user38</uid>
+ <short-name>user38</short-name>
+ <password>user38</password>
+ <full-name>User 38</full-name>
+ <email>user38@example.com</email>
+</record>
+<record type="user">
+ <uid>user39</uid>
+ <short-name>user39</short-name>
+ <password>user39</password>
+ <full-name>User 39</full-name>
+ <email>user39@example.com</email>
+</record>
+<record type="user">
+ <uid>user40</uid>
+ <short-name>user40</short-name>
+ <password>user40</password>
+ <full-name>User 40</full-name>
+ <email>user40@example.com</email>
+</record>
+<record type="user">
+ <uid>user41</uid>
+ <short-name>user41</short-name>
+ <password>user41</password>
+ <full-name>User 41</full-name>
+ <email>user41@example.com</email>
+</record>
+<record type="user">
+ <uid>user42</uid>
+ <short-name>user42</short-name>
+ <password>user42</password>
+ <full-name>User 42</full-name>
+ <email>user42@example.com</email>
+</record>
+<record type="user">
+ <uid>user43</uid>
+ <short-name>user43</short-name>
+ <password>user43</password>
+ <full-name>User 43</full-name>
+ <email>user43@example.com</email>
+</record>
+<record type="user">
+ <uid>user44</uid>
+ <short-name>user44</short-name>
+ <password>user44</password>
+ <full-name>User 44</full-name>
+ <email>user44@example.com</email>
+</record>
+<record type="user">
+ <uid>user45</uid>
+ <short-name>user45</short-name>
+ <password>user45</password>
+ <full-name>User 45</full-name>
+ <email>user45@example.com</email>
+</record>
+<record type="user">
+ <uid>user46</uid>
+ <short-name>user46</short-name>
+ <password>user46</password>
+ <full-name>User 46</full-name>
+ <email>user46@example.com</email>
+</record>
+<record type="user">
+ <uid>user47</uid>
+ <short-name>user47</short-name>
+ <password>user47</password>
+ <full-name>User 47</full-name>
+ <email>user47@example.com</email>
+</record>
+<record type="user">
+ <uid>user48</uid>
+ <short-name>user48</short-name>
+ <password>user48</password>
+ <full-name>User 48</full-name>
+ <email>user48@example.com</email>
+</record>
+<record type="user">
+ <uid>user49</uid>
+ <short-name>user49</short-name>
+ <password>user49</password>
+ <full-name>User 49</full-name>
+ <email>user49@example.com</email>
+</record>
+<record type="user">
+ <uid>user50</uid>
+ <short-name>user50</short-name>
+ <password>user50</password>
+ <full-name>User 50</full-name>
+ <email>user50@example.com</email>
+</record>
+<record type="user">
+ <uid>user51</uid>
+ <short-name>user51</short-name>
+ <password>user51</password>
+ <full-name>User 51</full-name>
+ <email>user51@example.com</email>
+</record>
+<record type="user">
+ <uid>user52</uid>
+ <short-name>user52</short-name>
+ <password>user52</password>
+ <full-name>User 52</full-name>
+ <email>user52@example.com</email>
+</record>
+<record type="user">
+ <uid>user53</uid>
+ <short-name>user53</short-name>
+ <password>user53</password>
+ <full-name>User 53</full-name>
+ <email>user53@example.com</email>
+</record>
+<record type="user">
+ <uid>user54</uid>
+ <short-name>user54</short-name>
+ <password>user54</password>
+ <full-name>User 54</full-name>
+ <email>user54@example.com</email>
+</record>
+<record type="user">
+ <uid>user55</uid>
+ <short-name>user55</short-name>
+ <password>user55</password>
+ <full-name>User 55</full-name>
+ <email>user55@example.com</email>
+</record>
+<record type="user">
+ <uid>user56</uid>
+ <short-name>user56</short-name>
+ <password>user56</password>
+ <full-name>User 56</full-name>
+ <email>user56@example.com</email>
+</record>
+<record type="user">
+ <uid>user57</uid>
+ <short-name>user57</short-name>
+ <password>user57</password>
+ <full-name>User 57</full-name>
+ <email>user57@example.com</email>
+</record>
+<record type="user">
+ <uid>user58</uid>
+ <short-name>user58</short-name>
+ <password>user58</password>
+ <full-name>User 58</full-name>
+ <email>user58@example.com</email>
+</record>
+<record type="user">
+ <uid>user59</uid>
+ <short-name>user59</short-name>
+ <password>user59</password>
+ <full-name>User 59</full-name>
+ <email>user59@example.com</email>
+</record>
+<record type="user">
+ <uid>user60</uid>
+ <short-name>user60</short-name>
+ <password>user60</password>
+ <full-name>User 60</full-name>
+ <email>user60@example.com</email>
+</record>
+<record type="user">
+ <uid>user61</uid>
+ <short-name>user61</short-name>
+ <password>user61</password>
+ <full-name>User 61</full-name>
+ <email>user61@example.com</email>
+</record>
+<record type="user">
+ <uid>user62</uid>
+ <short-name>user62</short-name>
+ <password>user62</password>
+ <full-name>User 62</full-name>
+ <email>user62@example.com</email>
+</record>
+<record type="user">
+ <uid>user63</uid>
+ <short-name>user63</short-name>
+ <password>user63</password>
+ <full-name>User 63</full-name>
+ <email>user63@example.com</email>
+</record>
+<record type="user">
+ <uid>user64</uid>
+ <short-name>user64</short-name>
+ <password>user64</password>
+ <full-name>User 64</full-name>
+ <email>user64@example.com</email>
+</record>
+<record type="user">
+ <uid>user65</uid>
+ <short-name>user65</short-name>
+ <password>user65</password>
+ <full-name>User 65</full-name>
+ <email>user65@example.com</email>
+</record>
+<record type="user">
+ <uid>user66</uid>
+ <short-name>user66</short-name>
+ <password>user66</password>
+ <full-name>User 66</full-name>
+ <email>user66@example.com</email>
+</record>
+<record type="user">
+ <uid>user67</uid>
+ <short-name>user67</short-name>
+ <password>user67</password>
+ <full-name>User 67</full-name>
+ <email>user67@example.com</email>
+</record>
+<record type="user">
+ <uid>user68</uid>
+ <short-name>user68</short-name>
+ <password>user68</password>
+ <full-name>User 68</full-name>
+ <email>user68@example.com</email>
+</record>
+<record type="user">
+ <uid>user69</uid>
+ <short-name>user69</short-name>
+ <password>user69</password>
+ <full-name>User 69</full-name>
+ <email>user69@example.com</email>
+</record>
+<record type="user">
+ <uid>user70</uid>
+ <short-name>user70</short-name>
+ <password>user70</password>
+ <full-name>User 70</full-name>
+ <email>user70@example.com</email>
+</record>
+<record type="user">
+ <uid>user71</uid>
+ <short-name>user71</short-name>
+ <password>user71</password>
+ <full-name>User 71</full-name>
+ <email>user71@example.com</email>
+</record>
+<record type="user">
+ <uid>user72</uid>
+ <short-name>user72</short-name>
+ <password>user72</password>
+ <full-name>User 72</full-name>
+ <email>user72@example.com</email>
+</record>
+<record type="user">
+ <uid>user73</uid>
+ <short-name>user73</short-name>
+ <password>user73</password>
+ <full-name>User 73</full-name>
+ <email>user73@example.com</email>
+</record>
+<record type="user">
+ <uid>user74</uid>
+ <short-name>user74</short-name>
+ <password>user74</password>
+ <full-name>User 74</full-name>
+ <email>user74@example.com</email>
+</record>
+<record type="user">
+ <uid>user75</uid>
+ <short-name>user75</short-name>
+ <password>user75</password>
+ <full-name>User 75</full-name>
+ <email>user75@example.com</email>
+</record>
+<record type="user">
+ <uid>user76</uid>
+ <short-name>user76</short-name>
+ <password>user76</password>
+ <full-name>User 76</full-name>
+ <email>user76@example.com</email>
+</record>
+<record type="user">
+ <uid>user77</uid>
+ <short-name>user77</short-name>
+ <password>user77</password>
+ <full-name>User 77</full-name>
+ <email>user77@example.com</email>
+</record>
+<record type="user">
+ <uid>user78</uid>
+ <short-name>user78</short-name>
+ <password>user78</password>
+ <full-name>User 78</full-name>
+ <email>user78@example.com</email>
+</record>
+<record type="user">
+ <uid>user79</uid>
+ <short-name>user79</short-name>
+ <password>user79</password>
+ <full-name>User 79</full-name>
+ <email>user79@example.com</email>
+</record>
+<record type="user">
+ <uid>user80</uid>
+ <short-name>user80</short-name>
+ <password>user80</password>
+ <full-name>User 80</full-name>
+ <email>user80@example.com</email>
+</record>
+<record type="user">
+ <uid>user81</uid>
+ <short-name>user81</short-name>
+ <password>user81</password>
+ <full-name>User 81</full-name>
+ <email>user81@example.com</email>
+</record>
+<record type="user">
+ <uid>user82</uid>
+ <short-name>user82</short-name>
+ <password>user82</password>
+ <full-name>User 82</full-name>
+ <email>user82@example.com</email>
+</record>
+<record type="user">
+ <uid>user83</uid>
+ <short-name>user83</short-name>
+ <password>user83</password>
+ <full-name>User 83</full-name>
+ <email>user83@example.com</email>
+</record>
+<record type="user">
+ <uid>user84</uid>
+ <short-name>user84</short-name>
+ <password>user84</password>
+ <full-name>User 84</full-name>
+ <email>user84@example.com</email>
+</record>
+<record type="user">
+ <uid>user85</uid>
+ <short-name>user85</short-name>
+ <password>user85</password>
+ <full-name>User 85</full-name>
+ <email>user85@example.com</email>
+</record>
+<record type="user">
+ <uid>user86</uid>
+ <short-name>user86</short-name>
+ <password>user86</password>
+ <full-name>User 86</full-name>
+ <email>user86@example.com</email>
+</record>
+<record type="user">
+ <uid>user87</uid>
+ <short-name>user87</short-name>
+ <password>user87</password>
+ <full-name>User 87</full-name>
+ <email>user87@example.com</email>
+</record>
+<record type="user">
+ <uid>user88</uid>
+ <short-name>user88</short-name>
+ <password>user88</password>
+ <full-name>User 88</full-name>
+ <email>user88@example.com</email>
+</record>
+<record type="user">
+ <uid>user89</uid>
+ <short-name>user89</short-name>
+ <password>user89</password>
+ <full-name>User 89</full-name>
+ <email>user89@example.com</email>
+</record>
+<record type="user">
+ <uid>user90</uid>
+ <short-name>user90</short-name>
+ <password>user90</password>
+ <full-name>User 90</full-name>
+ <email>user90@example.com</email>
+</record>
+<record type="user">
+ <uid>user91</uid>
+ <short-name>user91</short-name>
+ <password>user91</password>
+ <full-name>User 91</full-name>
+ <email>user91@example.com</email>
+</record>
+<record type="user">
+ <uid>user92</uid>
+ <short-name>user92</short-name>
+ <password>user92</password>
+ <full-name>User 92</full-name>
+ <email>user92@example.com</email>
+</record>
+<record type="user">
+ <uid>user93</uid>
+ <short-name>user93</short-name>
+ <password>user93</password>
+ <full-name>User 93</full-name>
+ <email>user93@example.com</email>
+</record>
+<record type="user">
+ <uid>user94</uid>
+ <short-name>user94</short-name>
+ <password>user94</password>
+ <full-name>User 94</full-name>
+ <email>user94@example.com</email>
+</record>
+<record type="user">
+ <uid>user95</uid>
+ <short-name>user95</short-name>
+ <password>user95</password>
+ <full-name>User 95</full-name>
+ <email>user95@example.com</email>
+</record>
+<record type="user">
+ <uid>user96</uid>
+ <short-name>user96</short-name>
+ <password>user96</password>
+ <full-name>User 96</full-name>
+ <email>user96@example.com</email>
+</record>
+<record type="user">
+ <uid>user97</uid>
+ <short-name>user97</short-name>
+ <password>user97</password>
+ <full-name>User 97</full-name>
+ <email>user97@example.com</email>
+</record>
+<record type="user">
+ <uid>user98</uid>
+ <short-name>user98</short-name>
+ <password>user98</password>
+ <full-name>User 98</full-name>
+ <email>user98@example.com</email>
+</record>
+<record type="user">
+ <uid>user99</uid>
+ <short-name>user99</short-name>
+ <password>user99</password>
+ <full-name>User 99</full-name>
+ <email>user99@example.com</email>
+</record>
+<record type="user">
+ <uid>user100</uid>
+ <short-name>user100</short-name>
+ <password>user100</password>
+ <full-name>User 100</full-name>
+ <email>user100@example.com</email>
+</record>
+<record type="user">
+ <uid>puser01</uid>
+ <short-name>puser01</short-name>
+ <password>puser01</password>
+ <full-name>Puser 01</full-name>
+ <email>puser01@example.com</email>
+</record>
+<record type="user">
+ <uid>puser02</uid>
+ <short-name>puser02</short-name>
+ <password>puser02</password>
+ <full-name>Puser 02</full-name>
+ <email>puser02@example.com</email>
+</record>
+<record type="user">
+ <uid>puser03</uid>
+ <short-name>puser03</short-name>
+ <password>puser03</password>
+ <full-name>Puser 03</full-name>
+ <email>puser03@example.com</email>
+</record>
+<record type="user">
+ <uid>puser04</uid>
+ <short-name>puser04</short-name>
+ <password>puser04</password>
+ <full-name>Puser 04</full-name>
+ <email>puser04@example.com</email>
+</record>
+<record type="user">
+ <uid>puser05</uid>
+ <short-name>puser05</short-name>
+ <password>puser05</password>
+ <full-name>Puser 05</full-name>
+ <email>puser05@example.com</email>
+</record>
+<record type="user">
+ <uid>puser06</uid>
+ <short-name>puser06</short-name>
+ <password>puser06</password>
+ <full-name>Puser 06</full-name>
+ <email>puser06@example.com</email>
+</record>
+<record type="user">
+ <uid>puser07</uid>
+ <short-name>puser07</short-name>
+ <password>puser07</password>
+ <full-name>Puser 07</full-name>
+ <email>puser07@example.com</email>
+</record>
+<record type="user">
+ <uid>puser08</uid>
+ <short-name>puser08</short-name>
+ <password>puser08</password>
+ <full-name>Puser 08</full-name>
+ <email>puser08@example.com</email>
+</record>
+<record type="user">
+ <uid>puser09</uid>
+ <short-name>puser09</short-name>
+ <password>puser09</password>
+ <full-name>Puser 09</full-name>
+ <email>puser09@example.com</email>
+</record>
+<record type="user">
+ <uid>puser10</uid>
+ <short-name>puser10</short-name>
+ <password>puser10</password>
+ <full-name>Puser 10</full-name>
+ <email>puser10@example.com</email>
+</record>
+<record type="user">
+ <uid>puser11</uid>
+ <short-name>puser11</short-name>
+ <password>puser11</password>
+ <full-name>Puser 11</full-name>
+ <email>puser11@example.com</email>
+</record>
+<record type="user">
+ <uid>puser12</uid>
+ <short-name>puser12</short-name>
+ <password>puser12</password>
+ <full-name>Puser 12</full-name>
+ <email>puser12@example.com</email>
+</record>
+<record type="user">
+ <uid>puser13</uid>
+ <short-name>puser13</short-name>
+ <password>puser13</password>
+ <full-name>Puser 13</full-name>
+ <email>puser13@example.com</email>
+</record>
+<record type="user">
+ <uid>puser14</uid>
+ <short-name>puser14</short-name>
+ <password>puser14</password>
+ <full-name>Puser 14</full-name>
+ <email>puser14@example.com</email>
+</record>
+<record type="user">
+ <uid>puser15</uid>
+ <short-name>puser15</short-name>
+ <password>puser15</password>
+ <full-name>Puser 15</full-name>
+ <email>puser15@example.com</email>
+</record>
+<record type="user">
+ <uid>puser16</uid>
+ <short-name>puser16</short-name>
+ <password>puser16</password>
+ <full-name>Puser 16</full-name>
+ <email>puser16@example.com</email>
+</record>
+<record type="user">
+ <uid>puser17</uid>
+ <short-name>puser17</short-name>
+ <password>puser17</password>
+ <full-name>Puser 17</full-name>
+ <email>puser17@example.com</email>
+</record>
+<record type="user">
+ <uid>puser18</uid>
+ <short-name>puser18</short-name>
+ <password>puser18</password>
+ <full-name>Puser 18</full-name>
+ <email>puser18@example.com</email>
+</record>
+<record type="user">
+ <uid>puser19</uid>
+ <short-name>puser19</short-name>
+ <password>puser19</password>
+ <full-name>Puser 19</full-name>
+ <email>puser19@example.com</email>
+</record>
+<record type="user">
+ <uid>puser20</uid>
+ <short-name>puser20</short-name>
+ <password>puser20</password>
+ <full-name>Puser 20</full-name>
+ <email>puser20@example.com</email>
+</record>
+<record type="user">
+ <uid>puser21</uid>
+ <short-name>puser21</short-name>
+ <password>puser21</password>
+ <full-name>Puser 21</full-name>
+ <email>puser21@example.com</email>
+</record>
+<record type="user">
+ <uid>puser22</uid>
+ <short-name>puser22</short-name>
+ <password>puser22</password>
+ <full-name>Puser 22</full-name>
+ <email>puser22@example.com</email>
+</record>
+<record type="user">
+ <uid>puser23</uid>
+ <short-name>puser23</short-name>
+ <password>puser23</password>
+ <full-name>Puser 23</full-name>
+ <email>puser23@example.com</email>
+</record>
+<record type="user">
+ <uid>puser24</uid>
+ <short-name>puser24</short-name>
+ <password>puser24</password>
+ <full-name>Puser 24</full-name>
+ <email>puser24@example.com</email>
+</record>
+<record type="user">
+ <uid>puser25</uid>
+ <short-name>puser25</short-name>
+ <password>puser25</password>
+ <full-name>Puser 25</full-name>
+ <email>puser25@example.com</email>
+</record>
+<record type="user">
+ <uid>puser26</uid>
+ <short-name>puser26</short-name>
+ <password>puser26</password>
+ <full-name>Puser 26</full-name>
+ <email>puser26@example.com</email>
+</record>
+<record type="user">
+ <uid>puser27</uid>
+ <short-name>puser27</short-name>
+ <password>puser27</password>
+ <full-name>Puser 27</full-name>
+ <email>puser27@example.com</email>
+</record>
+<record type="user">
+ <uid>puser28</uid>
+ <short-name>puser28</short-name>
+ <password>puser28</password>
+ <full-name>Puser 28</full-name>
+ <email>puser28@example.com</email>
+</record>
+<record type="user">
+ <uid>puser29</uid>
+ <short-name>puser29</short-name>
+ <password>puser29</password>
+ <full-name>Puser 29</full-name>
+ <email>puser29@example.com</email>
+</record>
+<record type="user">
+ <uid>puser30</uid>
+ <short-name>puser30</short-name>
+ <password>puser30</password>
+ <full-name>Puser 30</full-name>
+ <email>puser30@example.com</email>
+</record>
+<record type="user">
+ <uid>puser31</uid>
+ <short-name>puser31</short-name>
+ <password>puser31</password>
+ <full-name>Puser 31</full-name>
+ <email>puser31@example.com</email>
+</record>
+<record type="user">
+ <uid>puser32</uid>
+ <short-name>puser32</short-name>
+ <password>puser32</password>
+ <full-name>Puser 32</full-name>
+ <email>puser32@example.com</email>
+</record>
+<record type="user">
+ <uid>puser33</uid>
+ <short-name>puser33</short-name>
+ <password>puser33</password>
+ <full-name>Puser 33</full-name>
+ <email>puser33@example.com</email>
+</record>
+<record type="user">
+ <uid>puser34</uid>
+ <short-name>puser34</short-name>
+ <password>puser34</password>
+ <full-name>Puser 34</full-name>
+ <email>puser34@example.com</email>
+</record>
+<record type="user">
+ <uid>puser35</uid>
+ <short-name>puser35</short-name>
+ <password>puser35</password>
+ <full-name>Puser 35</full-name>
+ <email>puser35@example.com</email>
+</record>
+<record type="user">
+ <uid>puser36</uid>
+ <short-name>puser36</short-name>
+ <password>puser36</password>
+ <full-name>Puser 36</full-name>
+ <email>puser36@example.com</email>
+</record>
+<record type="user">
+ <uid>puser37</uid>
+ <short-name>puser37</short-name>
+ <password>puser37</password>
+ <full-name>Puser 37</full-name>
+ <email>puser37@example.com</email>
+</record>
+<record type="user">
+ <uid>puser38</uid>
+ <short-name>puser38</short-name>
+ <password>puser38</password>
+ <full-name>Puser 38</full-name>
+ <email>puser38@example.com</email>
+</record>
+<record type="user">
+ <uid>puser39</uid>
+ <short-name>puser39</short-name>
+ <password>puser39</password>
+ <full-name>Puser 39</full-name>
+ <email>puser39@example.com</email>
+</record>
+<record type="user">
+ <uid>puser40</uid>
+ <short-name>puser40</short-name>
+ <password>puser40</password>
+ <full-name>Puser 40</full-name>
+ <email>puser40@example.com</email>
+</record>
+<record type="user">
+ <uid>puser41</uid>
+ <short-name>puser41</short-name>
+ <password>puser41</password>
+ <full-name>Puser 41</full-name>
+ <email>puser41@example.com</email>
+</record>
+<record type="user">
+ <uid>puser42</uid>
+ <short-name>puser42</short-name>
+ <password>puser42</password>
+ <full-name>Puser 42</full-name>
+ <email>puser42@example.com</email>
+</record>
+<record type="user">
+ <uid>puser43</uid>
+ <short-name>puser43</short-name>
+ <password>puser43</password>
+ <full-name>Puser 43</full-name>
+ <email>puser43@example.com</email>
+</record>
+<record type="user">
+ <uid>puser44</uid>
+ <short-name>puser44</short-name>
+ <password>puser44</password>
+ <full-name>Puser 44</full-name>
+ <email>puser44@example.com</email>
+</record>
+<record type="user">
+ <uid>puser45</uid>
+ <short-name>puser45</short-name>
+ <password>puser45</password>
+ <full-name>Puser 45</full-name>
+ <email>puser45@example.com</email>
+</record>
+<record type="user">
+ <uid>puser46</uid>
+ <short-name>puser46</short-name>
+ <password>puser46</password>
+ <full-name>Puser 46</full-name>
+ <email>puser46@example.com</email>
+</record>
+<record type="user">
+ <uid>puser47</uid>
+ <short-name>puser47</short-name>
+ <password>puser47</password>
+ <full-name>Puser 47</full-name>
+ <email>puser47@example.com</email>
+</record>
+<record type="user">
+ <uid>puser48</uid>
+ <short-name>puser48</short-name>
+ <password>puser48</password>
+ <full-name>Puser 48</full-name>
+ <email>puser48@example.com</email>
+</record>
+<record type="user">
+ <uid>puser49</uid>
+ <short-name>puser49</short-name>
+ <password>puser49</password>
+ <full-name>Puser 49</full-name>
+ <email>puser49@example.com</email>
+</record>
+<record type="user">
+ <uid>puser50</uid>
+ <short-name>puser50</short-name>
+ <password>puser50</password>
+ <full-name>Puser 50</full-name>
+ <email>puser50@example.com</email>
+</record>
+<record type="user">
+ <uid>puser51</uid>
+ <short-name>puser51</short-name>
+ <password>puser51</password>
+ <full-name>Puser 51</full-name>
+ <email>puser51@example.com</email>
+</record>
+<record type="user">
+ <uid>puser52</uid>
+ <short-name>puser52</short-name>
+ <password>puser52</password>
+ <full-name>Puser 52</full-name>
+ <email>puser52@example.com</email>
+</record>
+<record type="user">
+ <uid>puser53</uid>
+ <short-name>puser53</short-name>
+ <password>puser53</password>
+ <full-name>Puser 53</full-name>
+ <email>puser53@example.com</email>
+</record>
+<record type="user">
+ <uid>puser54</uid>
+ <short-name>puser54</short-name>
+ <password>puser54</password>
+ <full-name>Puser 54</full-name>
+ <email>puser54@example.com</email>
+</record>
+<record type="user">
+ <uid>puser55</uid>
+ <short-name>puser55</short-name>
+ <password>puser55</password>
+ <full-name>Puser 55</full-name>
+ <email>puser55@example.com</email>
+</record>
+<record type="user">
+ <uid>puser56</uid>
+ <short-name>puser56</short-name>
+ <password>puser56</password>
+ <full-name>Puser 56</full-name>
+ <email>puser56@example.com</email>
+</record>
+<record type="user">
+ <uid>puser57</uid>
+ <short-name>puser57</short-name>
+ <password>puser57</password>
+ <full-name>Puser 57</full-name>
+ <email>puser57@example.com</email>
+</record>
+<record type="user">
+ <uid>puser58</uid>
+ <short-name>puser58</short-name>
+ <password>puser58</password>
+ <full-name>Puser 58</full-name>
+ <email>puser58@example.com</email>
+</record>
+<record type="user">
+ <uid>puser59</uid>
+ <short-name>puser59</short-name>
+ <password>puser59</password>
+ <full-name>Puser 59</full-name>
+ <email>puser59@example.com</email>
+</record>
+<record type="user">
+ <uid>puser60</uid>
+ <short-name>puser60</short-name>
+ <password>puser60</password>
+ <full-name>Puser 60</full-name>
+ <email>puser60@example.com</email>
+</record>
+<record type="user">
+ <uid>puser61</uid>
+ <short-name>puser61</short-name>
+ <password>puser61</password>
+ <full-name>Puser 61</full-name>
+ <email>puser61@example.com</email>
+</record>
+<record type="user">
+ <uid>puser62</uid>
+ <short-name>puser62</short-name>
+ <password>puser62</password>
+ <full-name>Puser 62</full-name>
+ <email>puser62@example.com</email>
+</record>
+<record type="user">
+ <uid>puser63</uid>
+ <short-name>puser63</short-name>
+ <password>puser63</password>
+ <full-name>Puser 63</full-name>
+ <email>puser63@example.com</email>
+</record>
+<record type="user">
+ <uid>puser64</uid>
+ <short-name>puser64</short-name>
+ <password>puser64</password>
+ <full-name>Puser 64</full-name>
+ <email>puser64@example.com</email>
+</record>
+<record type="user">
+ <uid>puser65</uid>
+ <short-name>puser65</short-name>
+ <password>puser65</password>
+ <full-name>Puser 65</full-name>
+ <email>puser65@example.com</email>
+</record>
+<record type="user">
+ <uid>puser66</uid>
+ <short-name>puser66</short-name>
+ <password>puser66</password>
+ <full-name>Puser 66</full-name>
+ <email>puser66@example.com</email>
+</record>
+<record type="user">
+ <uid>puser67</uid>
+ <short-name>puser67</short-name>
+ <password>puser67</password>
+ <full-name>Puser 67</full-name>
+ <email>puser67@example.com</email>
+</record>
+<record type="user">
+ <uid>puser68</uid>
+ <short-name>puser68</short-name>
+ <password>puser68</password>
+ <full-name>Puser 68</full-name>
+ <email>puser68@example.com</email>
+</record>
+<record type="user">
+ <uid>puser69</uid>
+ <short-name>puser69</short-name>
+ <password>puser69</password>
+ <full-name>Puser 69</full-name>
+ <email>puser69@example.com</email>
+</record>
+<record type="user">
+ <uid>puser70</uid>
+ <short-name>puser70</short-name>
+ <password>puser70</password>
+ <full-name>Puser 70</full-name>
+ <email>puser70@example.com</email>
+</record>
+<record type="user">
+ <uid>puser71</uid>
+ <short-name>puser71</short-name>
+ <password>puser71</password>
+ <full-name>Puser 71</full-name>
+ <email>puser71@example.com</email>
+</record>
+<record type="user">
+ <uid>puser72</uid>
+ <short-name>puser72</short-name>
+ <password>puser72</password>
+ <full-name>Puser 72</full-name>
+ <email>puser72@example.com</email>
+</record>
+<record type="user">
+ <uid>puser73</uid>
+ <short-name>puser73</short-name>
+ <password>puser73</password>
+ <full-name>Puser 73</full-name>
+ <email>puser73@example.com</email>
+</record>
+<record type="user">
+ <uid>puser74</uid>
+ <short-name>puser74</short-name>
+ <password>puser74</password>
+ <full-name>Puser 74</full-name>
+ <email>puser74@example.com</email>
+</record>
+<record type="user">
+ <uid>puser75</uid>
+ <short-name>puser75</short-name>
+ <password>puser75</password>
+ <full-name>Puser 75</full-name>
+ <email>puser75@example.com</email>
+</record>
+<record type="user">
+ <uid>puser76</uid>
+ <short-name>puser76</short-name>
+ <password>puser76</password>
+ <full-name>Puser 76</full-name>
+ <email>puser76@example.com</email>
+</record>
+<record type="user">
+ <uid>puser77</uid>
+ <short-name>puser77</short-name>
+ <password>puser77</password>
+ <full-name>Puser 77</full-name>
+ <email>puser77@example.com</email>
+</record>
+<record type="user">
+ <uid>puser78</uid>
+ <short-name>puser78</short-name>
+ <password>puser78</password>
+ <full-name>Puser 78</full-name>
+ <email>puser78@example.com</email>
+</record>
+<record type="user">
+ <uid>puser79</uid>
+ <short-name>puser79</short-name>
+ <password>puser79</password>
+ <full-name>Puser 79</full-name>
+ <email>puser79@example.com</email>
+</record>
+<record type="user">
+ <uid>puser80</uid>
+ <short-name>puser80</short-name>
+ <password>puser80</password>
+ <full-name>Puser 80</full-name>
+ <email>puser80@example.com</email>
+</record>
+<record type="user">
+ <uid>puser81</uid>
+ <short-name>puser81</short-name>
+ <password>puser81</password>
+ <full-name>Puser 81</full-name>
+ <email>puser81@example.com</email>
+</record>
+<record type="user">
+ <uid>puser82</uid>
+ <short-name>puser82</short-name>
+ <password>puser82</password>
+ <full-name>Puser 82</full-name>
+ <email>puser82@example.com</email>
+</record>
+<record type="user">
+ <uid>puser83</uid>
+ <short-name>puser83</short-name>
+ <password>puser83</password>
+ <full-name>Puser 83</full-name>
+ <email>puser83@example.com</email>
+</record>
+<record type="user">
+ <uid>puser84</uid>
+ <short-name>puser84</short-name>
+ <password>puser84</password>
+ <full-name>Puser 84</full-name>
+ <email>puser84@example.com</email>
+</record>
+<record type="user">
+ <uid>puser85</uid>
+ <short-name>puser85</short-name>
+ <password>puser85</password>
+ <full-name>Puser 85</full-name>
+ <email>puser85@example.com</email>
+</record>
+<record type="user">
+ <uid>puser86</uid>
+ <short-name>puser86</short-name>
+ <password>puser86</password>
+ <full-name>Puser 86</full-name>
+ <email>puser86@example.com</email>
+</record>
+<record type="user">
+ <uid>puser87</uid>
+ <short-name>puser87</short-name>
+ <password>puser87</password>
+ <full-name>Puser 87</full-name>
+ <email>puser87@example.com</email>
+</record>
+<record type="user">
+ <uid>puser88</uid>
+ <short-name>puser88</short-name>
+ <password>puser88</password>
+ <full-name>Puser 88</full-name>
+ <email>puser88@example.com</email>
+</record>
+<record type="user">
+ <uid>puser89</uid>
+ <short-name>puser89</short-name>
+ <password>puser89</password>
+ <full-name>Puser 89</full-name>
+ <email>puser89@example.com</email>
+</record>
+<record type="user">
+ <uid>puser90</uid>
+ <short-name>puser90</short-name>
+ <password>puser90</password>
+ <full-name>Puser 90</full-name>
+ <email>puser90@example.com</email>
+</record>
+<record type="user">
+ <uid>puser91</uid>
+ <short-name>puser91</short-name>
+ <password>puser91</password>
+ <full-name>Puser 91</full-name>
+ <email>puser91@example.com</email>
+</record>
+<record type="user">
+ <uid>puser92</uid>
+ <short-name>puser92</short-name>
+ <password>puser92</password>
+ <full-name>Puser 92</full-name>
+ <email>puser92@example.com</email>
+</record>
+<record type="user">
+ <uid>puser93</uid>
+ <short-name>puser93</short-name>
+ <password>puser93</password>
+ <full-name>Puser 93</full-name>
+ <email>puser93@example.com</email>
+</record>
+<record type="user">
+ <uid>puser94</uid>
+ <short-name>puser94</short-name>
+ <password>puser94</password>
+ <full-name>Puser 94</full-name>
+ <email>puser94@example.com</email>
+</record>
+<record type="user">
+ <uid>puser95</uid>
+ <short-name>puser95</short-name>
+ <password>puser95</password>
+ <full-name>Puser 95</full-name>
+ <email>puser95@example.com</email>
+</record>
+<record type="user">
+ <uid>puser96</uid>
+ <short-name>puser96</short-name>
+ <password>puser96</password>
+ <full-name>Puser 96</full-name>
+ <email>puser96@example.com</email>
+</record>
+<record type="user">
+ <uid>puser97</uid>
+ <short-name>puser97</short-name>
+ <password>puser97</password>
+ <full-name>Puser 97</full-name>
+ <email>puser97@example.com</email>
+</record>
+<record type="user">
+ <uid>puser98</uid>
+ <short-name>puser98</short-name>
+ <password>puser98</password>
+ <full-name>Puser 98</full-name>
+ <email>puser98@example.com</email>
+</record>
+<record type="user">
+ <uid>puser99</uid>
+ <short-name>puser99</short-name>
+ <password>puser99</password>
+ <full-name>Puser 99</full-name>
+ <email>puser99@example.com</email>
+</record>
+<record type="user">
+ <uid>puser100</uid>
+ <short-name>puser100</short-name>
+ <password>puser100</password>
+ <full-name>Puser 100</full-name>
+ <email>puser100@example.com</email>
+</record>
+</directory>
</ins></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestaccountsaugmentsxml"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/txdav/common/datastore/test/accounts/augments.xml (0 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/accounts/augments.xml         (rev 0)
+++ CalendarServer/trunk/txdav/common/datastore/test/accounts/augments.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -0,0 +1,1356 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2009-2014 Apple Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+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 "AS IS" 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.
+ -->
+
+<!DOCTYPE augments SYSTEM "../../../conf/auth/augments.dtd">
+
+<augments>
+ <!--
+ <record>
+ <uid>Location-Default</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ <auto-schedule-mode>automatic</auto-schedule-mode>
+ </record>
+ <record>
+ <uid>Resource-Default</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ <auto-schedule-mode>automatic</auto-schedule-mode>
+ </record>
+ -->
+
+ <record>
+ <uid>D11F03A0-97EA-48AF-9A6C-FAC7F3975766</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>6423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
+ <server-id>00001</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>5A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
+ <server-id>00002</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>8B4288F6-CC82-491D-8EF9-642EF4F3E7D0</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>5FF60DAD-0BDE-4508-8C77-15F0CA5C8DD1</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>543D28BA-F74F-4D5F-9243-B3E3A61171E5</uid>
+ <enable-calendar>false</enable-calendar>
+ <enable-addressbook>false</enable-addressbook>
+ </record>
+ <record>
+ <uid>right_coast</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>left_coast</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>mercury</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>gemini</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>apollo</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ <auto-accept-group>both_coasts</auto-accept-group>
+ </record>
+ <record>
+ <uid>orion</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>transporter</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>ftlcpu</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <!--
+ <record>
+ <uid>non_calendar_proxy</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+-->
+ <record>
+ <uid>7423F94A-6B76-4A3A-815B-D52CFD77935D</uid>
+ <enable-calendar>true</enable-calendar>
+ </record>
+ <record>
+ <uid>8A985493-EE2C-4665-94CF-4DFEA3A89500</uid>
+ <enable-calendar>true</enable-calendar>
+ </record>
+ <record>
+ <uid>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD2</uid>
+ <enable-calendar>true</enable-calendar>
+ </record>
+ <record>
+ <uid>9E1FFAC4-3CCD-45A1-8272-D161C92D2EEE</uid>
+ <enable-calendar>true</enable-calendar>
+ </record>
+ <record>
+ <uid>7678EC8A-A069-4E82-9066-7279C6718507</uid>
+ <enable-addressbook>true</enable-addressbook>
+ </record>
+ <record>
+ <uid>FC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
+ <enable-calendar>true</enable-calendar>
+ </record>
+ <record>
+ <uid>EC465590-E9E9-4746-ACE8-6C756A49FE4D</uid>
+ <enable-calendar>true</enable-calendar>
+ <enable-login>true</enable-login>
+ </record>
+ <record>
+ <uid>00599DAF-3E75-42DD-9DB7-52617E79943F</uid>
+ <enable-calendar>false</enable-calendar>
+ <enable-login>false</enable-login>
+ </record>
+ <record>
+ <uid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</uid>
+ <enable-calendar>true</enable-calendar>
+ <auto-schedule-mode>automatic</auto-schedule-mode>
+ </record>
+<record>
+ <uid>user01</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user02</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user03</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user04</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user05</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user06</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user07</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user08</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user09</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user10</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user11</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user12</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user13</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user14</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user15</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user16</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user17</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user18</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user19</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user20</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user21</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user22</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user23</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user24</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user25</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user26</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user27</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user28</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user29</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user30</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user31</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user32</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user33</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user34</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user35</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user36</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user37</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user38</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user39</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user40</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user41</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user42</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user43</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user44</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user45</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user46</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user47</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user48</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user49</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user50</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user51</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user52</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user53</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user54</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user55</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user56</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user57</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user58</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user59</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user60</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user61</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user62</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user63</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user64</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user65</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user66</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user67</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user68</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user69</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user70</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user71</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user72</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user73</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user74</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user75</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user76</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user77</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user78</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user79</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user80</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user81</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user82</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user83</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user84</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user85</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user86</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user87</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user88</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user89</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user90</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user91</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user92</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user93</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user94</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user95</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user96</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user97</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user98</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user99</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>user100</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser01</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser02</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser03</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser04</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser05</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser06</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser07</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser08</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser09</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser10</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser11</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser12</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser13</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser14</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser15</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser16</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser17</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser18</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser19</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser20</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser21</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser22</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser23</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser24</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser25</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser26</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser27</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser28</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser29</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser30</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser31</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser32</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser33</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser34</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser35</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser36</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser37</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser38</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser39</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser40</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser41</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser42</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser43</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser44</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser45</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser46</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser47</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser48</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser49</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser50</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser51</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser52</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser53</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser54</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser55</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser56</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser57</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser58</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser59</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser60</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser61</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser62</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser63</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser64</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser65</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser66</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser67</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser68</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser69</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser70</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser71</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser72</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser73</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser74</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser75</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser76</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser77</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser78</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser79</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser80</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser81</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser82</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser83</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser84</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser85</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser86</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser87</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser88</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser89</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser90</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser91</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser92</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser93</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser94</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser95</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser96</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser97</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser98</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser99</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+<record>
+ <uid>puser100</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+</augments>
</ins></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestaccountsgenerate_test_accountspy"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/txdav/common/datastore/test/accounts/generate_test_accounts.py (0 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/accounts/generate_test_accounts.py         (rev 0)
+++ CalendarServer/trunk/txdav/common/datastore/test/accounts/generate_test_accounts.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+#!/usr/bin/env python
+
+# Generates test directory records in accounts-test.xml,
+# (overwriting it if it exists in the current directory).
+
+prefix = """<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2006-2014 Apple Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+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 "AS IS" 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.
+ -->
+
+"""
+
+# accounts-test.xml
+
+out = file("accounts-test.xml", "w")
+out.write(prefix)
+out.write('<!DOCTYPE accounts SYSTEM "accounts.dtd">\n\n')
+out.write('<directory realm="Test Realm">\n')
+
+
+
+# user01-100
+for i in xrange(1, 101):
+ out.write("""<record type="user">
+ <uid>user{ctr:02d}</uid>
+ <short-name>user{ctr:02d}</short-name>
+ <password>user{ctr:02d}</password>
+ <full-name>User {ctr:02d}</full-name>
+ <email>user{ctr:02d}@example.com</email>
+</record>
+""".format(ctr=i))
+for i in xrange(1, 101):
+ out.write("""<record type="user">
+ <uid>puser{ctr:02d}</uid>
+ <short-name>puser{ctr:02d}</short-name>
+ <password>puser{ctr:02d}</password>
+ <full-name>Puser {ctr:02d}</full-name>
+ <email>puser{ctr:02d}@example.com</email>
+</record>
+""".format(ctr=i))
+out.write("</directory>\n")
+out.close()
+
+
+
+out = file("augments-test.xml", "w")
+out.write(prefix)
+out.write('<!DOCTYPE augments SYSTEM "augments.dtd">\n\n')
+out.write("<augments>\n")
+
+for i in xrange(1, 101):
+ out.write("""<record>
+ <uid>user{ctr:02d}</uid>
+ <server-id>A</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+""".format(ctr=i))
+
+for i in xrange(1, 101):
+ out.write("""<record>
+ <uid>puser{ctr:02d}</uid>
+ <server-id>B</server-id>
+ <enable-calendar>true</enable-calendar>
+ <enable-addressbook>true</enable-addressbook>
+</record>
+""".format(ctr=i))
+
+out.close()
</ins></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestaccountsproxiesxml"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/txdav/common/datastore/test/accounts/proxies.xml (0 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/accounts/proxies.xml         (rev 0)
+++ CalendarServer/trunk/txdav/common/datastore/test/accounts/proxies.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2006-2014 Apple Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+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 "AS IS" 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.
+ -->
+
+<!DOCTYPE proxies SYSTEM "../../../conf/auth/proxies.dtd">
+
+<proxies>
+ <record>
+ <guid>mercury</guid>
+ <write-proxies>
+ <member>left_coast</member>
+ </write-proxies>
+ </record>
+ <record>
+ <guid>gemini</guid>
+ <write-proxies>
+ <member>6423F94A-6B76-4A3A-815B-D52CFD77935D</member>
+ </write-proxies>
+ </record>
+ <record>
+ <guid>apollo</guid>
+ <write-proxies>
+ <member>both_coasts</member>
+ </write-proxies>
+ </record>
+ <record>
+ <guid>orion</guid>
+ <write-proxies>
+ <member>recursive1_coasts</member>
+ </write-proxies>
+ </record>
+ <record>
+ <guid>non_calendar_proxy</guid>
+ <write-proxies>
+ <member>non_calendar_group</member>
+ </write-proxies>
+ <read-proxies>
+ <member>recursive2_coasts</member>
+ </read-proxies>
+ </record>
+ <record>
+ <guid>7423F94A-6B76-4A3A-815B-D52CFD77935D</guid>
+ <write-proxies>
+ <member>8A985493-EE2C-4665-94CF-4DFEA3A89500</member>
+ <member>9FF60DAD-0BDE-4508-8C77-15F0CA5C8DD2</member>
+ </write-proxies>
+ </record>
+ <record>
+ <guid>FC465590-E9E9-4746-ACE8-6C756A49FE4D</guid>
+ <write-proxies>
+ <member>EC465590-E9E9-4746-ACE8-6C756A49FE4D</member>
+ <member>00599DAF-3E75-42DD-9DB7-52617E79943F</member>
+ </write-proxies>
+ </record>
+</proxies>
</ins></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestaccountsresourcesxml"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/txdav/common/datastore/test/accounts/resources.xml (0 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/accounts/resources.xml         (rev 0)
+++ CalendarServer/trunk/txdav/common/datastore/test/accounts/resources.xml        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Copyright (c) 2006-2014 Apple Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+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 "AS IS" 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.
+ -->
+
+<!DOCTYPE accounts SYSTEM "../../../conf/auth/accounts.dtd">
+
+<directory realm="Test">
+ <record type="location">
+ <uid>mercury</uid>
+ <short-name>mercury</short-name>
+ <password>mercury</password>
+ <full-name>Mercury Seven</full-name>
+ <email>mercury@example.com</email>
+ </record>
+ <record type="location">
+ <uid>gemini</uid>
+ <short-name>gemini</short-name>
+ <password>gemini</password>
+ <full-name>Gemini Twelve</full-name>
+ <email>gemini@example.com</email>
+ </record>
+ <record type="location">
+ <uid>apollo</uid>
+ <short-name>apollo</short-name>
+ <password>apollo</password>
+ <full-name>Apollo Eleven</full-name>
+ <email>apollo@example.com</email>
+ </record>
+ <record type="location">
+ <uid>orion</uid>
+ <short-name>orion</short-name>
+ <password>orion</password>
+ <full-name>Orion</full-name>
+ <email>orion@example.com</email>
+ </record>
+ <record type="resource">
+ <uid>transporter</uid>
+ <short-name>transporter</short-name>
+ <password>transporter</password>
+ <full-name>Mass Transporter</full-name>
+ <email>transporter@example.com</email>
+ </record>
+ <record type="resource">
+ <uid>ftlcpu</uid>
+ <short-name>ftlcpu</short-name>
+ <password>ftlcpu</password>
+ <full-name>Faster-Than-Light Microprocessor</full-name>
+ <email>ftlcpu@example.com</email>
+ </record>
+ <record type="resource">
+ <uid>non_calendar_proxy</uid>
+ <short-name>non_calendar_proxy</short-name>
+ <password>non_calendar_proxy</password>
+ <full-name>Non-calendar proxy</full-name>
+ <email>non_calendar_proxy@example.com</email>
+ </record>
+ <record type="resource">
+ <uid>disabled</uid>
+ <short-name>disabled</short-name>
+ <password>disabled</password>
+ <full-name>Disabled Record</full-name>
+ <email>disabled@example.com</email>
+ </record>
+ <record type="location">
+ <uid>__sanchezoffice__</uid>
+ <short-name>sanchezoffice</short-name>
+ <full-name>Sanchez Office</full-name>
+ </record>
+ <record type="location">
+ <uid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</uid>
+ <guid>75EA36BE-F71B-40F9-81F9-CF59BF40CA8F</guid>
+ <short-name>location01</short-name>
+ <password>location01</password>
+ <full-name>Room 01</full-name>
+ </record>
+ <record type="location">
+ <uid>room-addr-1</uid>
+ <guid>634A102B-6902-464F-9451-8A86A31628C1</guid>
+ <short-name>room-with-address-1</short-name>
+ <password>room-addr-2</password>
+ <full-name>Room with Address 1</full-name>
+ <associated-address>1-infinite-loop</associated-address>
+ </record>
+ <record type="location">
+ <uid>room-addr-2</uid>
+ <short-name>room-with-address-2</short-name>
+ <password>room-addr-2</password>
+ <full-name>Room with Address 2</full-name>
+ <associated-address>2-infinite-loop</associated-address>
+ </record>
+ <record type="address">
+ <uid>1-infinite-loop</uid>
+ <short-name>il1</short-name>
+ <full-name>One Infinite Loop</full-name>
+ <street-address>1 Infinite Loop, Cupertino, CA 95014</street-address>
+ <geographic-location>37.331741,-122.030333</geographic-location>
+ </record>
+ <record type="address">
+ <uid>2-infinite-loop</uid>
+ <short-name>il2</short-name>
+ <full-name>Two Infinite Loop</full-name>
+ <street-address>2 Infinite Loop, Cupertino, CA 95014</street-address>
+ <geographic-location>37.332633,-122.030502</geographic-location>
+ </record>
+
+</directory>
</ins></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretesttest_sqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/test/test_sql.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/test_sql.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/test/test_sql.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -26,11 +26,10 @@
</span><span class="cx"> from twisted.trial.unittest import TestCase
</span><span class="cx"> from twisted.internet.defer import Deferred
</span><span class="cx">
</span><del>-from txdav.caldav.datastore.test.util import buildDirectoryRecord
</del><span class="cx"> from txdav.common.datastore.sql import log, CommonStoreTransactionMonitor, \
</span><span class="cx"> CommonHome, CommonHomeChild, ECALENDARTYPE
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><del>-from txdav.common.datastore.test.util import CommonCommonTests, buildStore
</del><ins>+from txdav.common.datastore.test.util import CommonCommonTests
</ins><span class="cx"> from txdav.common.icommondatastore import AllRetriesFailed
</span><span class="cx"> from txdav.common.datastore.sql import fixUUIDNormalization
</span><span class="cx"> from txdav.xml import element as davxml
</span><span class="lines">@@ -38,9 +37,10 @@
</span><span class="cx"> from uuid import UUID
</span><span class="cx">
</span><span class="cx"> exampleUID = UUID("a" * 32)
</span><del>-denormalizedUID = str(exampleUID)
</del><ins>+denormalizedUID = unicode(exampleUID)
</ins><span class="cx"> normalizedUID = denormalizedUID.upper()
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> class CommonSQLStoreTests(CommonCommonTests, TestCase):
</span><span class="cx"> """
</span><span class="cx"> Tests for shared functionality in L{txdav.common.datastore.sql}.
</span><span class="lines">@@ -52,19 +52,11 @@
</span><span class="cx"> Set up two stores to migrate between.
</span><span class="cx"> """
</span><span class="cx"> yield super(CommonSQLStoreTests, self).setUp()
</span><del>- self._sqlStore = yield buildStore(self, self.notifierFactory)
- self._sqlStore.directoryService().addRecord(buildDirectoryRecord(denormalizedUID))
- self._sqlStore.directoryService().addRecord(buildDirectoryRecord(normalizedUID))
- self._sqlStore.directoryService().addRecord(buildDirectoryRecord("uid"))
</del><ins>+ yield self.buildStoreAndDirectory(
+ extraUids=(denormalizedUID, normalizedUID, u"uid")
+ )
</ins><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Return a store for testing.
- """
- return self._sqlStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_logging(self):
</span><span class="cx"> """
</span><span class="lines">@@ -72,9 +64,9 @@
</span><span class="cx"> """
</span><span class="cx">
</span><span class="cx"> # Patch config to turn on logging then rebuild the store
</span><del>- self.patch(self._sqlStore, "logLabels", True)
- self.patch(self._sqlStore, "logStats", True)
- self.patch(self._sqlStore, "logSQL", True)
</del><ins>+ self.patch(self.store, "logLabels", True)
+ self.patch(self.store, "logStats", True)
+ self.patch(self.store, "logSQL", True)
</ins><span class="cx">
</span><span class="cx"> txn = self.transactionUnderTest()
</span><span class="cx"> cs = schema.CALENDARSERVER
</span><span class="lines">@@ -97,7 +89,7 @@
</span><span class="cx"> self.patch(CommonStoreTransactionMonitor, "callLater", c.callLater)
</span><span class="cx">
</span><span class="cx"> # Patch config to turn on log waits then rebuild the store
</span><del>- self.patch(self._sqlStore, "logTransactionWaits", 1)
</del><ins>+ self.patch(self.store, "logTransactionWaits", 1)
</ins><span class="cx">
</span><span class="cx"> ctr = [0]
</span><span class="cx"> def counter(*args, **kwargs):
</span><span class="lines">@@ -120,7 +112,7 @@
</span><span class="cx"> self.patch(CommonStoreTransactionMonitor, "callLater", c.callLater)
</span><span class="cx">
</span><span class="cx"> # Patch config to turn on transaction timeouts then rebuild the store
</span><del>- self.patch(self._sqlStore, "timeoutTransactions", 1)
</del><ins>+ self.patch(self.store, "timeoutTransactions", 1)
</ins><span class="cx">
</span><span class="cx"> ctr = [0]
</span><span class="cx"> def counter(*args, **kwargs):
</span><span class="lines">@@ -145,8 +137,8 @@
</span><span class="cx"> self.patch(CommonStoreTransactionMonitor, "callLater", c.callLater)
</span><span class="cx">
</span><span class="cx"> # Patch config to turn on log waits then rebuild the store
</span><del>- self.patch(self._sqlStore, "logTransactionWaits", 1)
- self.patch(self._sqlStore, "timeoutTransactions", 2)
</del><ins>+ self.patch(self.store, "logTransactionWaits", 1)
+ self.patch(self.store, "timeoutTransactions", 2)
</ins><span class="cx">
</span><span class="cx"> ctr = [0, 0]
</span><span class="cx"> def counter(logStr, *args, **kwargs):
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoretestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/test/util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/test/util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/test/util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -23,10 +23,6 @@
</span><span class="cx">
</span><span class="cx"> import os
</span><span class="cx">
</span><del>-from zope.interface.declarations import implements
-from txdav.common.idirectoryservice import IStoreDirectoryService, \
- IStoreDirectoryRecord
-
</del><span class="cx"> # FIXME: Don't import from calendarserver in txdav
</span><span class="cx"> from calendarserver.push.notifier import Notifier
</span><span class="cx">
</span><span class="lines">@@ -37,7 +33,7 @@
</span><span class="cx"> from random import Random
</span><span class="cx">
</span><span class="cx"> from twext.python.log import Logger
</span><del>-from twext.python.filepath import CachingFilePath
</del><ins>+from twext.python.filepath import CachingFilePath as FilePath
</ins><span class="cx"> from twext.enterprise.adbapi2 import ConnectionPool
</span><span class="cx"> from twext.enterprise.ienterprise import AlreadyFinishedError
</span><span class="cx"> from twext.who.directory import DirectoryRecord
</span><span class="lines">@@ -45,12 +41,12 @@
</span><span class="cx"> from twisted.application.service import Service
</span><span class="cx"> from twisted.internet import reactor
</span><span class="cx"> from twisted.internet.defer import Deferred, inlineCallbacks
</span><del>-from twisted.internet.defer import returnValue, succeed
</del><ins>+from twisted.internet.defer import returnValue
</ins><span class="cx"> from twisted.internet.task import deferLater
</span><span class="cx"> from twisted.trial.unittest import TestCase
</span><span class="cx">
</span><span class="cx"> from twistedcaldav import ical
</span><del>-from twistedcaldav.config import config
</del><ins>+from twistedcaldav.config import config, ConfigDict
</ins><span class="cx"> from twistedcaldav.ical import Component as VComponent, Component
</span><span class="cx"> from twistedcaldav.stdconfig import DEFAULT_CONFIG
</span><span class="cx"> from twistedcaldav.vcard import Component as ABComponent
</span><span class="lines">@@ -62,6 +58,7 @@
</span><span class="cx"> from txdav.common.datastore.sql import CommonDataStore, current_sql_schema
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><span class="cx"> from txdav.common.icommondatastore import NoSuchHomeChildError
</span><ins>+from txdav.who.util import buildDirectory
</ins><span class="cx">
</span><span class="cx"> from txweb2.dav.resource import TwistedGETContentMD5
</span><span class="cx">
</span><span class="lines">@@ -103,100 +100,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class TestStoreDirectoryService(object):
</del><span class="cx">
</span><del>- implements(IStoreDirectoryService)
-
- def __init__(self):
- self.records = {}
-
-
- def recordWithUID(self, uid):
- return succeed(self.records.get(uid))
-
-
- def recordWithGUID(self, guid):
- for record in self.records.itervalues():
- if record.guid == guid:
- return succeed(record)
- return succeed(None)
-
-
- def recordWithCalendarUserAddress(self, cuaddr):
- if cuaddr.startswith("urn:x-uid:"):
- return self.recordWithUID(cuaddr[10:])
- elif cuaddr.startswith("urn:uuid:"):
- return self.recordWithUID(cuaddr[9:])
- else:
- return succeed(None)
-
-
- def addRecord(self, record):
- self.records[record.uid] = record
-
-
- def removeRecord(self, uid):
- del self.records[uid]
-
-
-
-class TestStoreDirectoryRecord(object):
-
- implements(IStoreDirectoryRecord)
-
- def __init__(self, uid, shortNames, fullName, thisServer=True, server=None, extras={}):
- self.uid = uid
- self.guid = uid
- self.shortNames = shortNames
- self.fullName = fullName
- self.displayName = self.fullName if self.fullName else self.shortNames[0]
- self._thisServer = thisServer
- self._server = server
- self.extras = extras
-
-
- def thisServer(self):
- return self._thisServer
-
-
- def server(self):
- return self._server
-
-
- def serverURI(self):
- return self._server.uri if self._server else ""
-
-
-
-def buildDirectory(homes=None):
-
- directory = TestStoreDirectoryService()
-
- # User accounts
- for ctr in range(1, 100):
- directory.addRecord(TestStoreDirectoryRecord(
- "user%02d" % (ctr,),
- ("user%02d" % (ctr,),),
- "User %02d" % (ctr,),
- ))
-
- homes = set(homes) if homes is not None else set()
- for uid in homes:
- directory.addRecord(buildDirectoryRecord(uid))
-
- return directory
-
-
-
-def buildDirectoryRecord(uid):
- return TestStoreDirectoryRecord(
- uid,
- (uid,),
- uid.capitalize(),
- )
-
-
-
</del><span class="cx"> class SQLStoreBuilder(object):
</span><span class="cx"> """
</span><span class="cx"> Test-fixture-builder which can construct a PostgresStore.
</span><span class="lines">@@ -211,7 +115,7 @@
</span><span class="cx"> """
</span><span class="cx"> Create a L{PostgresService} to use for building a store.
</span><span class="cx"> """
</span><del>- dbRoot = CachingFilePath(self.sharedDBPath)
</del><ins>+ dbRoot = FilePath(self.sharedDBPath)
</ins><span class="cx"> return PostgresService(
</span><span class="cx"> dbRoot, serviceFactory, current_sql_schema, resetSchema=True,
</span><span class="cx"> databaseName="caldav",
</span><span class="lines">@@ -234,7 +138,7 @@
</span><span class="cx"> """
</span><span class="cx"> disableMemcacheForTest(TestCase())
</span><span class="cx"> staticQuota = 3000
</span><del>- attachmentRoot = (CachingFilePath(self.sharedDBPath).child("attachments"))
</del><ins>+ attachmentRoot = (FilePath(self.sharedDBPath).child("attachments"))
</ins><span class="cx"> stubsvc = self.createService(lambda cf: Service())
</span><span class="cx">
</span><span class="cx"> cp = ConnectionPool(stubsvc.produceConnection, maxConnections=1)
</span><span class="lines">@@ -244,7 +148,7 @@
</span><span class="cx"> cds = CommonDataStore(
</span><span class="cx"> cp.connection,
</span><span class="cx"> {"push": StubNotifierFactory(), },
</span><del>- TestStoreDirectoryService(),
</del><ins>+ None,
</ins><span class="cx"> attachmentRoot, "",
</span><span class="cx"> quota=staticQuota
</span><span class="cx"> )
</span><span class="lines">@@ -258,10 +162,9 @@
</span><span class="cx"> @return: a L{Deferred} which fires with an L{IDataStore}.
</span><span class="cx"> """
</span><span class="cx"> disableMemcacheForTest(testCase)
</span><del>- dbRoot = CachingFilePath(self.sharedDBPath)
</del><ins>+ dbRoot = FilePath(self.sharedDBPath)
</ins><span class="cx"> attachmentRoot = dbRoot.child("attachments")
</span><del>- if directoryService is None:
- directoryService = buildDirectory(homes=homes)
</del><ins>+ # The directory will be given to us later via setDirectoryService
</ins><span class="cx"> if self.sharedService is None:
</span><span class="cx"> ready = Deferred()
</span><span class="cx"> def getReady(connectionFactory, storageService):
</span><span class="lines">@@ -694,6 +597,106 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><ins>+
+def buildTestDirectory(
+ store, dataRoot, accounts=None, resources=None, augments=None, proxies=None,
+ serversDB=None
+):
+ """
+ @param store: the store for the directory to use
+
+ @param dataRoot: the directory to copy xml files to
+
+ @param accounts: path to the accounts.xml file
+ @type accounts: L{FilePath}
+
+ @param resources: path to the resources.xml file
+ @type resources: L{FilePath}
+
+ @param augments: path to the augments.xml file
+ @type augments: L{FilePath}
+
+ @param proxies: path to the proxies.xml file
+ @type proxies: L{FilePath}
+
+ @return: the directory service
+ @rtype: L{IDirectoryService}
+ """
+
+ defaultDirectory = FilePath(__file__).sibling("accounts")
+ if accounts is None:
+ accounts = defaultDirectory.child("accounts.xml")
+ if resources is None:
+ resources = defaultDirectory.child("resources.xml")
+ if augments is None:
+ augments = defaultDirectory.child("augments.xml")
+ if proxies is None:
+ proxies = defaultDirectory.child("proxies.xml")
+
+ if not os.path.exists(dataRoot):
+ os.makedirs(dataRoot)
+
+ accountsCopy = FilePath(dataRoot).child("accounts.xml")
+ accountsCopy.setContent(accounts.getContent())
+
+ resourcesCopy = FilePath(dataRoot).child("resources.xml")
+ resourcesCopy.setContent(resources.getContent())
+
+ augmentsCopy = FilePath(dataRoot).child("augments.xml")
+ augmentsCopy.setContent(augments.getContent())
+
+ proxiesCopy = FilePath(dataRoot).child("proxies.xml")
+ proxiesCopy.setContent(proxies.getContent())
+
+ servicesInfo = (
+ ConfigDict(
+ {
+ "Enabled": True,
+ "type": "xml",
+ "params": {
+ "xmlFile": "accounts.xml",
+ "recordTypes": ("users", "groups"),
+ },
+ }
+ ),
+ ConfigDict(
+ {
+ "Enabled": True,
+ "type": "xml",
+ "params": {
+ "xmlFile": "resources.xml",
+ "recordTypes": ("locations", "resources", "addresses"),
+ },
+ }
+ ),
+ )
+ augmentServiceInfo = ConfigDict(
+ {
+ "type": "twistedcaldav.directory.augment.AugmentXMLDB",
+ "params": {
+ "xmlFiles": ["augments.xml", ],
+ "statSeconds": 15,
+ },
+ }
+ )
+ wikiServiceInfo = ConfigDict(
+ {
+ "Enabled": True,
+ "CollabHost": "localhost",
+ "CollabPort": 4444,
+ }
+ )
+ directory = buildDirectory(
+ store, dataRoot, servicesInfo, augmentServiceInfo, wikiServiceInfo,
+ serversDB
+ )
+
+ store.setDirectoryService(directory)
+
+ return directory
+
+
+
</ins><span class="cx"> class CommonCommonTests(object):
</span><span class="cx"> """
</span><span class="cx"> Common utility functionality for file/store combination tests.
</span><span class="lines">@@ -703,6 +706,85 @@
</span><span class="cx"> savedStore = None
</span><span class="cx"> assertProvides = assertProvides
</span><span class="cx">
</span><ins>+
+ @inlineCallbacks
+ def buildStoreAndDirectory(
+ self, accounts=None, resources=None, augments=None, proxies=None,
+ extraUids=None, serversDB=None
+ ):
+
+ self.serverRoot = self.mktemp()
+ os.mkdir(self.serverRoot)
+
+ self.counter = 0
+ self.notifierFactory = StubNotifierFactory()
+
+ config.reset()
+ self.configure()
+
+ self.store = yield self.buildStore()
+ self._sqlCalendarStore = self.store # FIXME: remove references to this
+
+ self.directory = buildTestDirectory(
+ self.store, config.DataRoot,
+ accounts=accounts, resources=resources,
+ augments=augments, proxies=proxies,
+ serversDB=serversDB
+ )
+ if extraUids:
+ for uid in extraUids:
+ yield self.addRecordFromFields(
+ {
+ self.directory.fieldName.uid:
+ uid,
+ self.directory.fieldName.recordType:
+ self.directory.recordType.user,
+ }
+ )
+
+
+ def configure(self):
+ """
+ Modify the configuration to suit unit tests, with a mktemp-created
+ ServerRoot
+ """
+
+ config.ServerRoot = os.path.abspath(self.serverRoot)
+ config.ConfigRoot = "config"
+ config.LogRoot = "logs"
+ config.RunRoot = "logs"
+
+ if not os.path.exists(config.DataRoot):
+ os.makedirs(config.DataRoot)
+ if not os.path.exists(config.DocumentRoot):
+ os.makedirs(config.DocumentRoot)
+ if not os.path.exists(config.ConfigRoot):
+ os.makedirs(config.ConfigRoot)
+ if not os.path.exists(config.LogRoot):
+ os.makedirs(config.LogRoot)
+
+ # Work queues for implicit scheduling slow down tests a lot and require them all to add
+ # "waits" for work to complete. Rewriting all the current tests to do that is not practical
+ # right now, so we will turn this off by default. Instead we will have a set of tests dedicated
+ # to work queue-based scheduling which will patch this option to True.
+ config.Scheduling.Options.WorkQueues.Enabled = False
+
+ self.config = config
+
+
+
+ def buildStore(self, storeBuilder=theStoreBuilder):
+ """
+ Builds and returns a store
+ """
+
+ # Build the store before the directory; the directory will be assigned
+ # to the store via setDirectoryService()
+ return storeBuilder.buildStore(self, self.notifierFactory, None)
+
+
+
+
</ins><span class="cx"> def transactionUnderTest(self, txn=None):
</span><span class="cx"> """
</span><span class="cx"> Create a transaction from C{storeUnderTest} and save it as
</span><span class="lines">@@ -758,29 +840,12 @@
</span><span class="cx"> return result
</span><span class="cx">
</span><span class="cx">
</span><del>- def setUp(self):
- self.counter = 0
- self.notifierFactory = StubNotifierFactory()
- self.configInit()
</del><span class="cx">
</span><del>-
- def configInit(self):
- """
- Hard code some config options
- """
-
- # Work queues for implicit scheduling slow down tests a lot and require them all to add
- # "waits" for work to complete. Rewriting all the current tests to do that is not practical
- # right now, so we will turn this off by default. Instead we will have a set of tests dedicated
- # to work queue-based scheduling which will patch this option to True.
- config.Scheduling.Options.WorkQueues.Enabled = False
-
-
</del><span class="cx"> def storeUnderTest(self):
</span><span class="cx"> """
</span><del>- Subclasses must implement this method.
</del><ins>+ Create and return the L{CalendarStore} for testing.
</ins><span class="cx"> """
</span><del>- raise NotImplementedError("CommonCommonTests subclasses must implement.")
</del><ins>+ return self.store
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -855,6 +920,16 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><ins>+ def addRecordFromFields(self, fields):
+ updatedRecord = DirectoryRecord(self.directory, fields)
+ yield self.directory.updateRecords((updatedRecord,), create=True)
+
+ @inlineCallbacks
+ def removeRecord(self, uid):
+ yield self.directory.removeRecords([uid])
+
+
+ @inlineCallbacks
</ins><span class="cx"> def changeRecord(self, record, fieldname, value):
</span><span class="cx"> fields = record.fields.copy()
</span><span class="cx"> fields[fieldname] = value
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoreupgradetesttest_migratepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/upgrade/test/test_migrate.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/upgrade/test/test_migrate.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/upgrade/test/test_migrate.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -39,12 +39,12 @@
</span><span class="cx"> from txdav.carddav.datastore.test.common import CommonTests as ABCommonTests
</span><span class="cx"> from txdav.common.datastore.file import CommonDataStore
</span><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><del>-from txdav.common.datastore.test.util import SQLStoreBuilder, \
- TestStoreDirectoryService
-from txdav.common.datastore.test.util import theStoreBuilder, \
- populateCalendarsFrom, StubNotifierFactory, resetCalendarMD5s, \
- populateAddressBooksFrom, resetAddressBookMD5s, deriveValue, \
- withSpecialValue
</del><ins>+from txdav.common.datastore.test.util import SQLStoreBuilder
+from txdav.common.datastore.test.util import (
+ populateCalendarsFrom, StubNotifierFactory, resetCalendarMD5s,
+ populateAddressBooksFrom, resetAddressBookMD5s, deriveValue,
+ withSpecialValue, CommonCommonTests
+)
</ins><span class="cx"> from txdav.common.datastore.upgrade.migrate import UpgradeToDatabaseStep, \
</span><span class="cx"> StoreSpawnerService, swapAMP
</span><span class="cx"> from txdav.xml import element
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class HomeMigrationTests(TestCase):
</del><ins>+class HomeMigrationTests(CommonCommonTests, TestCase):
</ins><span class="cx"> """
</span><span class="cx"> Tests for L{UpgradeToDatabaseStep}.
</span><span class="cx"> """
</span><span class="lines">@@ -161,26 +161,28 @@
</span><span class="cx"> """
</span><span class="cx"> Set up two stores to migrate between.
</span><span class="cx"> """
</span><ins>+
+ yield super(HomeMigrationTests, self).setUp()
+ yield self.buildStoreAndDirectory(
+ extraUids=(
+ u"home1",
+ u"home2",
+ u"home3",
+ u"home_defaults",
+ u"home_no_splits",
+ u"home_splits",
+ u"home_splits_shared",
+ )
+ )
+ self.sqlStore = self.store
+
</ins><span class="cx"> # Add some files to the file store.
</span><span class="cx">
</span><span class="cx"> self.filesPath = CachingFilePath(self.mktemp())
</span><span class="cx"> self.filesPath.createDirectory()
</span><span class="cx"> fileStore = self.fileStore = CommonDataStore(
</span><del>- self.filesPath, {"push": StubNotifierFactory()}, TestStoreDirectoryService(), True, True
</del><ins>+ self.filesPath, {"push": StubNotifierFactory()}, self.directory, True, True
</ins><span class="cx"> )
</span><del>- self.sqlStore = yield theStoreBuilder.buildStore(
- self,
- StubNotifierFactory(),
- homes=(
- "home1",
- "home2",
- "home3",
- "home_defaults",
- "home_no_splits",
- "home_splits",
- "home_splits_shared",
- )
- )
</del><span class="cx"> self.upgrader = UpgradeToDatabaseStep(self.fileStore, self.sqlStore)
</span><span class="cx">
</span><span class="cx"> requirements = CommonTests.requirements
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoreworktesttest_inbox_cleanuppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/work/test/test_inbox_cleanup.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks
</span><span class="cx"> from twisted.trial.unittest import TestCase
</span><span class="cx"> from twistedcaldav.config import config
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.sql_tables import schema
</span><span class="cx"> import datetime
</span><span class="cx">
</span><span class="lines">@@ -38,7 +37,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(InboxCleanupTests, self).setUp()
</span><del>- self._sqlStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -121,13 +120,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_inboxCleanupWorkQueueing(self):
</span><span class="cx"> """
</span></span></pre></div>
<a id="CalendarServertrunktxdavcommondatastoreworktesttest_revision_cleanuppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/common/datastore/work/test/test_revision_cleanup.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/common/datastore/work/test/test_revision_cleanup.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/common/datastore/work/test/test_revision_cleanup.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> from twisted.trial.unittest import TestCase
</span><span class="cx"> from twistedcaldav.config import config
</span><span class="cx"> from twistedcaldav.vcard import Component as VCard
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore
</del><span class="cx"> from txdav.common.datastore.sql_tables import schema, _BIND_MODE_READ
</span><span class="cx"> from txdav.common.datastore.test.util import CommonCommonTests, populateCalendarsFrom
</span><span class="cx"> from txdav.common.datastore.work.revision_cleanup import FindMinValidRevisionWork, RevisionCleanupWork
</span><span class="lines">@@ -40,7 +39,7 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><span class="cx"> yield super(RevisionCleanupTests, self).setUp()
</span><del>- self._sqlStore = yield buildCalendarStore(self, self.notifierFactory)
</del><ins>+ yield self.buildStoreAndDirectory()
</ins><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx"> class FakeWork(WorkItem):
</span><span class="lines">@@ -221,13 +220,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlStore
-
-
</del><span class="cx"> @inlineCallbacks
</span><span class="cx"> def _createCalendarShare(self):
</span><span class="cx"> # Invite
</span></span></pre></div>
<a id="CalendarServertrunktxdavdpstesttest_clientpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/dps/test/test_client.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/dps/test/test_client.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/dps/test/test_client.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -375,7 +375,7 @@
</span><span class="cx"> records = (yield self.client.recordsWithRecordType(
</span><span class="cx"> RecordType.user
</span><span class="cx"> ))
</span><del>- self.assertEquals(len(records), 34)
</del><ins>+ self.assertEquals(len(records), 240)
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhodirectorypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/directory.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/directory.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/who/directory.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue
</span><span class="cx"> from twistedcaldav.config import config
</span><span class="cx"> from twistedcaldav.ical import Property
</span><del>-from txdav.caldav.datastore.scheduling.ischedule.localservers import Servers
</del><span class="cx"> from txdav.caldav.datastore.scheduling.utils import normalizeCUAddr
</span><span class="cx"> from txdav.who.delegates import RecordType as DelegateRecordType
</span><span class="cx"> from txdav.who.idirectory import (
</span><span class="lines">@@ -52,6 +51,14 @@
</span><span class="cx">
</span><span class="cx"> guid = "1332A615-4D3A-41FE-B636-FBE25BFB982E"
</span><span class="cx">
</span><ins>+
+
+ serversDB = None
+
+ def setServersDB(self, serversDB):
+ self.serversDB = serversDB
+
+
</ins><span class="cx"> # Must maintain the hack for a bit longer:
</span><span class="cx"> def setPrincipalCollection(self, principalCollection):
</span><span class="cx"> """
</span><span class="lines">@@ -395,8 +402,11 @@
</span><span class="cx"> """
</span><span class="cx"> URL of the server hosting this record. Return None if hosted on this server.
</span><span class="cx"> """
</span><del>- if config.Servers.Enabled and getattr(self, "serviceNodeUID", None):
- return Servers.getServerURIById(self.serviceNodeUID)
</del><ins>+ if (
+ self.service.serversDB is not None and
+ getattr(self, "serviceNodeUID", None)
+ ):
+ return self.service.serversDB.getServerURIById(self.serviceNodeUID)
</ins><span class="cx"> else:
</span><span class="cx"> return None
</span><span class="cx">
</span><span class="lines">@@ -405,8 +415,11 @@
</span><span class="cx"> """
</span><span class="cx"> Server hosting this record. Return None if hosted on this server.
</span><span class="cx"> """
</span><del>- if config.Servers.Enabled and getattr(self, "serviceNodeUID", None):
- return Servers.getServerById(self.serviceNodeUID)
</del><ins>+ if (
+ self.service.serversDB is not None and
+ getattr(self, "serviceNodeUID", None)
+ ):
+ return self.service.serversDB.getServerById(self.serviceNodeUID)
</ins><span class="cx"> else:
</span><span class="cx"> return None
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhotestsupportpy"></a>
<div class="addfile"><h4>Added: CalendarServer/trunk/txdav/who/test/support.py (0 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/test/support.py         (rev 0)
+++ CalendarServer/trunk/txdav/who/test/support.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+##
+# Copyright (c) 2013 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# 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 "AS IS" 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.
+##
+
+from twext.who.idirectory import (
+ RecordType,
+ NoSuchRecordError
+)
+from twext.who.index import DirectoryService as IndexDirectoryService
+from twext.who.util import ConstantsContainer
+from txdav.who.idirectory import (
+ RecordType as CalRecordType
+)
+from twisted.internet.defer import succeed, inlineCallbacks
+
+
+
+class InMemoryDirectoryService(IndexDirectoryService):
+ """
+ An in-memory IDirectoryService. You must call updateRecords( ) if you want
+ to populate this service.
+ """
+
+ recordType = ConstantsContainer(
+ (
+ RecordType.user,
+ RecordType.group,
+ CalRecordType.location,
+ CalRecordType.resource,
+ CalRecordType.address
+ )
+ )
+
+
+ def loadRecords(self):
+ pass
+
+
+ @inlineCallbacks
+ def updateRecords(self, records, create=False):
+ recordsByUID = dict(((record.uid, record) for record in records))
+ if not create:
+ # Make sure all the records already exist
+ for uid, record in recordsByUID.items():
+ if uid not in self._index[self.fieldName.uid]:
+ raise NoSuchRecordError(uid)
+
+ yield self.removeRecords(recordsByUID.keys())
+ self.indexRecords(records)
+
+
+ def removeRecords(self, uids):
+ index = self._index
+ for fieldName in self.indexedFields:
+ for recordSet in index[fieldName].itervalues():
+ for record in list(recordSet):
+ if record.uid in uids:
+ recordSet.remove(record)
+ return succeed(None)
</ins></span></pre></div>
<a id="CalendarServertrunktxdavwhotesttest_group_attendeespy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/test/test_group_attendees.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/test/test_group_attendees.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/who/test/test_group_attendees.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -18,17 +18,17 @@
</span><span class="cx"> group attendee tests
</span><span class="cx"> """
</span><span class="cx">
</span><ins>+import os
+
+from twext.python.filepath import CachingFilePath as FilePath
</ins><span class="cx"> from twext.who.directory import DirectoryService
</span><del>-from twext.who.test.test_xml import xmlService
</del><span class="cx"> from twisted.internet.defer import inlineCallbacks, returnValue
</span><span class="cx"> from twisted.trial import unittest
</span><span class="cx"> from twistedcaldav.config import config
</span><span class="cx"> from twistedcaldav.ical import Component, normalize_iCalStr, ignoredComponents
</span><del>-from txdav.caldav.datastore.test.util import buildCalendarStore, populateCalendarsFrom, CommonCommonTests
</del><ins>+from txdav.caldav.datastore.test.util import populateCalendarsFrom, CommonCommonTests
</ins><span class="cx"> from txdav.who.directory import CalendarDirectoryRecordMixin
</span><span class="cx"> from txdav.who.groups import GroupCacher
</span><del>-from txdav.who.util import directoryFromConfig
-import os
</del><span class="cx">
</span><span class="cx">
</span><span class="cx"> class GroupAttendeeReconciliation(CommonCommonTests, unittest.TestCase):
</span><span class="lines">@@ -38,43 +38,29 @@
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def setUp(self):
</span><del>- self.patch(config.GroupAttendees, "Enabled", "True")
- self.patch(config.GroupAttendees, "ReconciliationDelaySeconds", "0")
-
</del><span class="cx"> yield super(GroupAttendeeReconciliation, self).setUp()
</span><del>- self.xmlService = xmlService(self.mktemp(), xmlData=None)
</del><span class="cx">
</span><del>- self.patch(
- config.DirectoryService.params,
- "xmlFile",
- os.path.join(
- os.path.dirname(__file__), "accounts", "groupAttendeeAccounts.xml"
- )
</del><ins>+ accountsFilePath = FilePath(
+ os.path.join(os.path.dirname(__file__), "accounts")
</ins><span class="cx"> )
</span><del>- self.patch(
- config.ResourceService.params,
- "xmlFile",
- os.path.join(
- os.path.dirname(__file__), "accounts", "resources.xml"
- )
</del><ins>+ yield self.buildStoreAndDirectory(
+ accounts=accountsFilePath.child("groupAttendeeAccounts.xml"),
+ resources=accountsFilePath.child("resources.xml"),
</ins><span class="cx"> )
</span><del>- self._sqlCalendarStore = yield buildCalendarStore(self, self.notifierFactory, directoryFromConfig(config))
</del><span class="cx"> yield self.populate()
</span><span class="cx">
</span><span class="cx"> self.paths = {}
</span><span class="cx">
</span><span class="cx">
</span><del>- def storeUnderTest(self):
- """
- Create and return a L{CalendarStore} for testing.
- """
- return self._sqlCalendarStore
</del><ins>+ def configure(self):
+ super(GroupAttendeeReconciliation, self).configure()
+ config.GroupAttendees.Enabled = True
+ config.GroupAttendees.ReconciliationDelaySeconds = 0
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def populate(self):
</span><span class="cx"> yield populateCalendarsFrom(self.requirements, self.storeUnderTest())
</span><del>- self.notifierFactory.reset()
</del><span class="cx">
</span><span class="cx"> requirements = {
</span><span class="cx"> "10000000-0000-0000-0000-000000000001" : None,
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhotesttest_utilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/test/test_util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/test/test_util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/who/test/test_util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -20,7 +20,8 @@
</span><span class="cx">
</span><span class="cx"> import os
</span><span class="cx">
</span><del>-from txdav.who.util import directoryFromConfig, InMemoryDirectoryService
</del><ins>+from txdav.who.util import directoryFromConfig
+from txdav.who.test.support import InMemoryDirectoryService
</ins><span class="cx"> from twisted.internet.defer import inlineCallbacks
</span><span class="cx"> from twisted.trial.unittest import TestCase
</span><span class="cx"> from twistedcaldav.config import ConfigDict
</span></span></pre></div>
<a id="CalendarServertrunktxdavwhoutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/txdav/who/util.py (13467 => 13468)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/txdav/who/util.py        2014-05-09 20:48:38 UTC (rev 13467)
+++ CalendarServer/trunk/txdav/who/util.py        2014-05-09 23:38:16 UTC (rev 13468)
</span><span class="lines">@@ -20,10 +20,8 @@
</span><span class="cx"> from twext.python.types import MappingProxyType
</span><span class="cx"> from twext.who.aggregate import DirectoryService as AggregateDirectoryService
</span><span class="cx"> from twext.who.idirectory import (
</span><del>- FieldName as BaseFieldName, RecordType, DirectoryConfigurationError,
- NoSuchRecordError
</del><ins>+ FieldName as BaseFieldName, RecordType, DirectoryConfigurationError
</ins><span class="cx"> )
</span><del>-from twext.who.index import DirectoryService as IndexDirectoryService
</del><span class="cx"> from twext.who.ldap import (
</span><span class="cx"> DirectoryService as LDAPDirectoryService, LDAPAttribute,
</span><span class="cx"> FieldName as LDAPFieldName,
</span><span class="lines">@@ -31,7 +29,6 @@
</span><span class="cx"> )
</span><span class="cx"> from twext.who.util import ConstantsContainer
</span><span class="cx"> from twisted.cred.credentials import UsernamePassword
</span><del>-from twisted.internet.defer import succeed, inlineCallbacks
</del><span class="cx"> from twisted.python.filepath import FilePath
</span><span class="cx"> from twisted.python.reflect import namedClass
</span><span class="cx"> from twistedcaldav.config import fullServerPath
</span><span class="lines">@@ -48,16 +45,20 @@
</span><span class="cx"> log = Logger()
</span><span class="cx">
</span><span class="cx">
</span><del>-def directoryFromConfig(config, store=None):
</del><ins>+def directoryFromConfig(config, store=None, serversDB=None):
</ins><span class="cx"> """
</span><span class="cx"> Return a directory service based on the config. If you want to go through
</span><span class="cx"> AMP to talk to one of these as a client, instantiate
</span><span class="cx"> txdav.dps.client.DirectoryService
</span><span class="cx"> """
</span><span class="cx">
</span><del>- # MOVE2WHO FIXME: this needs to talk to its own separate database. In
- # fact, don't pass store=None if you already have called storeFromConfig()
- # within this process. Pass the existing store in here.
</del><ins>+ # Note: Currently the directory needs a store, and the store needs a
+ # directory. Originally the directory's store was going to be different
+ # from the calendar and contacts store, but we're not doing that, maybe
+ # ever, since it brings more headaches (managing multiple schema upgrades,
+ # etc.) You can pass store=None in here and the store will be created for
+ # you, but don't pass store=None if you already have called storeFromConfig()
+ # within this same process; pass that store in instead.
</ins><span class="cx">
</span><span class="cx"> # TODO: use proxyForInterface to ensure we're only using the DPS related
</span><span class="cx"> # store API. Also define an IDirectoryProxyStore Interface
</span><span class="lines">@@ -65,10 +66,38 @@
</span><span class="cx"> _ignore_pool, txnFactory = getDBPool(config)
</span><span class="cx"> store = storeFromConfig(config, txnFactory, None)
</span><span class="cx">
</span><ins>+ return buildDirectory(
+ store,
+ config.DataRoot,
+ [config.DirectoryService, config.ResourceService],
+ config.AugmentService,
+ config.Authentication.Wiki,
+ serversDB=serversDB
+ )
+
+
+def buildDirectory(
+ store, dataRoot, servicesInfo, augmentServiceInfo, wikiServiceInfo,
+ serversDB=None
+):
+ """
+ Return a directory without using a config object; suitable for tests
+ which need to have mulitple directory instances.
+
+ @param store: The store.
+ @param dataRoot: The path to the directory containing xml files for any xml
+ based services.
+ @param servicesInfo: An interable of ConfigDicts mirroring the
+ DirectoryService and ResourceService sections of stdconfig
+ @param augmentServiceInfo: A ConfigDict mirroring the AugmentService section
+ of stdconfig
+ @param wikiServiceInfo: A ConfigDict mirroring the Wiki section of stdconfig
+ @param serversDB: A ServersDB object to assign to the directory
+ """
+
</ins><span class="cx"> aggregatedServices = []
</span><span class="cx">
</span><del>- for serviceKey in ("DirectoryService", "ResourceService"):
- serviceValue = config.get(serviceKey, None)
</del><ins>+ for serviceValue in servicesInfo:
</ins><span class="cx">
</span><span class="cx"> if not serviceValue.Enabled:
</span><span class="cx"> continue
</span><span class="lines">@@ -76,14 +105,9 @@
</span><span class="cx"> directoryType = serviceValue.type.lower()
</span><span class="cx"> params = serviceValue.params
</span><span class="cx">
</span><del>- # TODO: add a "test" directory service that produces test records
- # from code -- no files needed.
- # The InMemoryDirectoryService now exists, it just needs hooking up
- # here.
-
</del><span class="cx"> if "xml" in directoryType:
</span><span class="cx"> xmlFile = params.xmlFile
</span><del>- xmlFile = fullServerPath(config.DataRoot, xmlFile)
</del><ins>+ xmlFile = fullServerPath(dataRoot, xmlFile)
</ins><span class="cx"> fp = FilePath(xmlFile)
</span><span class="cx"> if not fp.exists():
</span><span class="cx"> fp.setContent(DEFAULT_XML_CONTENT)
</span><span class="lines">@@ -144,6 +168,10 @@
</span><span class="cx"> })
</span><span class="cx"> )
</span><span class="cx">
</span><ins>+ elif "inmemory" in directoryType:
+ from txdav.who.test.support import InMemoryDirectoryService
+ directory = InMemoryDirectoryService()
+
</ins><span class="cx"> else:
</span><span class="cx"> log.error("Invalid DirectoryType: {dt}", dt=directoryType)
</span><span class="cx"> raise DirectoryConfigurationError
</span><span class="lines">@@ -180,14 +208,14 @@
</span><span class="cx"> #
</span><span class="cx"> # Setup the Augment Service
</span><span class="cx"> #
</span><del>- if config.AugmentService.type:
- augmentClass = namedClass(config.AugmentService.type)
</del><ins>+ if augmentServiceInfo.type:
+ augmentClass = namedClass(augmentServiceInfo.type)
</ins><span class="cx"> log.info(
</span><span class="cx"> "Configuring augment service of type: {augmentClass}",
</span><span class="cx"> augmentClass=augmentClass
</span><span class="cx"> )
</span><span class="cx"> try:
</span><del>- augmentService = augmentClass(**config.AugmentService.params)
</del><ins>+ augmentService = augmentClass(**augmentServiceInfo.params)
</ins><span class="cx"> except IOError:
</span><span class="cx"> log.error("Could not start augment service")
</span><span class="cx"> raise
</span><span class="lines">@@ -211,12 +239,12 @@
</span><span class="cx"> aggregatedServices.append(delegateDirectory)
</span><span class="cx">
</span><span class="cx"> # Wiki service
</span><del>- if config.Authentication.Wiki.Enabled:
</del><ins>+ if wikiServiceInfo.Enabled:
</ins><span class="cx"> aggregatedServices.append(
</span><span class="cx"> WikiDirectoryService(
</span><span class="cx"> userDirectory.realmName,
</span><del>- config.Authentication.Wiki.CollabHost,
- config.Authentication.Wiki.CollabPort
</del><ins>+ wikiServiceInfo.CollabHost,
+ wikiServiceInfo.CollabPort
</ins><span class="cx"> )
</span><span class="cx"> )
</span><span class="cx">
</span><span class="lines">@@ -242,6 +270,9 @@
</span><span class="cx"> log.error("Could not create directory service", error=e)
</span><span class="cx"> raise
</span><span class="cx">
</span><ins>+ if serversDB is not None:
+ augmented.setServersDB(serversDB)
+
</ins><span class="cx"> return augmented
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -249,47 +280,3 @@
</span><span class="cx">
</span><span class="cx"> <directory realm="Realm"/>
</span><span class="cx"> """
</span><del>-
-
-class InMemoryDirectoryService(IndexDirectoryService):
- """
- An in-memory IDirectoryService. You must call updateRecords( ) if you want
- to populate this service.
- """
-
- recordType = ConstantsContainer(
- (
- RecordType.user,
- RecordType.group,
- CalRecordType.location,
- CalRecordType.resource,
- CalRecordType.address
- )
- )
-
-
- def loadRecords(self):
- pass
-
-
- @inlineCallbacks
- def updateRecords(self, records, create=False):
- recordsByUID = dict(((record.uid, record) for record in records))
- if not create:
- # Make sure all the records already exist
- for uid, _ignore_record in recordsByUID.items():
- if uid not in self._index[self.fieldName.uid]:
- raise NoSuchRecordError(uid)
-
- yield self.removeRecords(recordsByUID.keys())
- self.indexRecords(records)
-
-
- def removeRecords(self, uids):
- index = self._index
- for fieldName in self.indexedFields:
- for recordSet in index[fieldName].itervalues():
- for record in list(recordSet):
- if record.uid in uids:
- recordSet.remove(record)
- return succeed(None)
</del></span></pre>
</div>
</div>
</body>
</html>