<!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>[10772] CalendarServer/trunk/twext/who/test</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>Rename _testService() to service()</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunktwextwhotesttest_directorypy">CalendarServer/trunk/twext/who/test/test_directory.py</a></li>
<li><a href="#CalendarServertrunktwextwhotesttest_xmlpy">CalendarServer/trunk/twext/who/test/test_xml.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunktwextwhotesttest_directorypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/who/test/test_directory.py (10771 => 10772)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/who/test/test_directory.py        2013-02-21 17:48:12 UTC (rev 10771)
+++ CalendarServer/trunk/twext/who/test/test_directory.py        2013-02-21 17:57:48 UTC (rev 10772)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     realmName = &quot;xyzzy&quot;
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    def _testService(self):
</del><ins>+    def service(self):
</ins><span class="cx">         if not hasattr(self, &quot;_service&quot;):
</span><span class="cx">             self._service = DirectoryService(self.realmName)
</span><span class="cx">         return self._service
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> class DirectoryServiceTest(BaseTest):
</span><span class="cx">     def test_interface(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         try:
</span><span class="cx">             verifyObject(IDirectoryService, service)
</span><span class="cx">         except BrokenMethodImplementation as e:
</span><span class="lines">@@ -52,18 +52,18 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_init(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         self.assertEquals(service.realmName, self.realmName)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_repr(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         self.assertEquals(repr(service), &quot;&lt;DirectoryService 'xyzzy'&gt;&quot;)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordTypes(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         self.assertEquals(
</span><span class="cx">             set((yield service.recordTypes())),
</span><span class="cx">             set(service.recordType.iterconstants())
</span><span class="lines">@@ -72,14 +72,14 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordsFromQueryNone(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = (yield service.recordsFromQuery(()))
</span><span class="cx">         for record in records:
</span><span class="cx">             self.failTest(&quot;No records expected&quot;)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_recordsFromQueryBogus(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         self.assertFailure(service.recordsFromQuery((object(),)), QueryNotSupportedError)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx">         if fields is None:
</span><span class="cx">             fields = self.fields_wsanchez
</span><span class="cx">         if service is None:
</span><del>-            service = self._testService()
</del><ins>+            service = self.service()
</ins><span class="cx">         return DirectoryRecord(service, fields)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_init(self):
</span><del>-        service  = self._testService()
</del><ins>+        service  = self.service()
</ins><span class="cx">         wsanchez = self._testRecord(self.fields_wsanchez, service=service)
</span><span class="cx"> 
</span><span class="cx">         self.assertEquals(wsanchez.service, service)
</span></span></pre></div>
<a id="CalendarServertrunktwextwhotesttest_xmlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/who/test/test_xml.py (10771 => 10772)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/who/test/test_xml.py        2013-02-21 17:48:12 UTC (rev 10771)
+++ CalendarServer/trunk/twext/who/test/test_xml.py        2013-02-21 17:57:48 UTC (rev 10772)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class BaseTest(object):
</span><del>-    def _testService(self, xmlData=None):
</del><ins>+    def service(self, xmlData=None):
</ins><span class="cx">         if xmlData is None:
</span><span class="cx">             xmlData = testXMLConfig
</span><span class="cx"> 
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> 
</span><span class="cx"> class DirectoryServiceTest(BaseTest, test_directory.DirectoryServiceTest):
</span><span class="cx">     def test_repr(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         self.assertEquals(repr(service), &quot;&lt;TestService (not loaded)&gt;&quot;)
</span><span class="cx">         service.loadRecords()
</span><span class="lines">@@ -194,14 +194,14 @@
</span><span class="cx"> 
</span><span class="cx">     def test_realmNameImmutable(self):
</span><span class="cx">         def setRealmName():
</span><del>-            service = self._testService()
</del><ins>+            service = self.service()
</ins><span class="cx">             service.realmName = &quot;foo&quot;
</span><span class="cx"> 
</span><span class="cx">         self.assertRaises(AssertionError, setRealmName)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_reloadInterval(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         service.loadRecords(stat=False)
</span><span class="cx">         lastRefresh = service._lastRefresh
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_reloadStat(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         service.loadRecords(loadNow=True)
</span><span class="cx">         lastRefresh = service._lastRefresh
</span><span class="lines">@@ -225,13 +225,13 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_badXML(self):
</span><del>-        service = self._testService(xmlData=&quot;Hello&quot;)
</del><ins>+        service = self.service(xmlData=&quot;Hello&quot;)
</ins><span class="cx"> 
</span><span class="cx">         self.assertRaises(ParseError, service.loadRecords)
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_badRootElement(self):
</span><del>-        service = self._testService(xmlData=
</del><ins>+        service = self.service(xmlData=
</ins><span class="cx"> &quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;frobnitz /&gt;
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_noRealmName(self):
</span><del>-        service = self._testService(xmlData=
</del><ins>+        service = self.service(xmlData=
</ins><span class="cx"> &quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;directory /&gt;
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordWithUID(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         record = (yield service.recordWithUID(&quot;__null__&quot;))
</span><span class="cx">         self.assertEquals(record, None)
</span><span class="lines">@@ -277,13 +277,13 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordWithGUID(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         record = (yield service.recordWithGUID(&quot;6C495FCD-7E78-4D5C-AA66-BC890AD04C9D&quot;))
</span><span class="cx">         self.assertEquals(record, None)
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordsWithRecordType(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         records = (yield service.recordsWithRecordType(object()))
</span><span class="cx">         self.assertEquals(set(records), set())
</span><span class="lines">@@ -315,7 +315,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordWithShortName(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         record = (yield service.recordWithShortName(service.recordType.user, &quot;null&quot;))
</span><span class="cx">         self.assertEquals(record, None)
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_recordsWithEmailAddress(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         records = (yield service.recordsWithEmailAddress(&quot;wsanchez@bitbucket.calendarserver.org&quot;))
</span><span class="cx">         self.assertRecords(records, (&quot;__wsanchez__&quot;,))
</span><span class="lines">@@ -343,7 +343,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryAnd(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery(
</span><span class="cx">             (
</span><span class="cx">                 service.query(&quot;emailAddresses&quot;, &quot;shared@example.com&quot;),
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryOr(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery(
</span><span class="cx">             (
</span><span class="cx">                 service.query(&quot;emailAddresses&quot;, &quot;shared@example.com&quot;),
</span><span class="lines">@@ -369,7 +369,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryNot(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery(
</span><span class="cx">             (
</span><span class="cx">                 service.query(&quot;emailAddresses&quot;, &quot;shared@example.com&quot;),
</span><span class="lines">@@ -382,7 +382,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryNotNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery(
</span><span class="cx">             (
</span><span class="cx">                 service.query(&quot;emailAddresses&quot;, &quot;shared@example.com&quot;),
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryCaseInsensitive(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(&quot;shortNames&quot;, &quot;SagEn&quot;, flags=MatchFlags.caseInsensitive),
</span><span class="cx">         ))
</span><span class="lines">@@ -404,7 +404,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryCaseInsensitiveNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(&quot;fullNames&quot;, &quot;moRGen SAGen&quot;, flags=MatchFlags.caseInsensitive),
</span><span class="cx">         ))
</span><span class="lines">@@ -413,7 +413,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryStartsWith(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(&quot;shortNames&quot;, &quot;wil&quot;, matchType=MatchType.startsWith),
</span><span class="cx">         ))
</span><span class="lines">@@ -422,7 +422,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryStartsWithNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(&quot;fullNames&quot;, &quot;Wilfredo&quot;, matchType=MatchType.startsWith),
</span><span class="cx">         ))
</span><span class="lines">@@ -431,7 +431,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryStartsWithNot(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;shortNames&quot;, &quot;w&quot;,
</span><span class="lines">@@ -465,7 +465,7 @@
</span><span class="cx">         included or not?  It is, because one matches the query, but
</span><span class="cx">         should NOT require that all match?
</span><span class="cx">         &quot;&quot;&quot;
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;shortNames&quot;, &quot;wil&quot;,
</span><span class="lines">@@ -494,7 +494,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryStartsWithNotNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;fullNames&quot;, &quot;Wilfredo&quot;,
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryStartsWithCaseInsensitive(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;shortNames&quot;, &quot;WIL&quot;,
</span><span class="lines">@@ -535,7 +535,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryStartsWithCaseInsensitiveNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;fullNames&quot;, &quot;wilfrEdo&quot;,
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryContains(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(&quot;shortNames&quot;, &quot;sanchez&quot;, matchType=MatchType.contains),
</span><span class="cx">         ))
</span><span class="lines">@@ -557,7 +557,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryContainsNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(&quot;fullNames&quot;, &quot;fred&quot;, matchType=MatchType.contains),
</span><span class="cx">         ))
</span><span class="lines">@@ -566,7 +566,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryContainsNot(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;shortNames&quot;, &quot;sanchez&quot;,
</span><span class="lines">@@ -594,7 +594,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryContainsNotNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;fullNames&quot;, &quot;fred&quot;,
</span><span class="lines">@@ -622,7 +622,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryContainsCaseInsensitive(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;shortNames&quot;, &quot;Sanchez&quot;,
</span><span class="lines">@@ -635,7 +635,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_queryContainsCaseInsensitiveNoIndex(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         records = yield service.recordsFromQuery((
</span><span class="cx">             service.query(
</span><span class="cx">                 &quot;fullNames&quot;, &quot;frEdo&quot;,
</span><span class="lines">@@ -647,12 +647,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_unknownRecordTypesClean(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         self.assertEquals(set(service.unknownRecordTypes), set())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_unknownRecordTypesDirty(self):
</span><del>-        service = self._testService(xmlData=
</del><ins>+        service = self.service(xmlData=
</ins><span class="cx"> &quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;directory realm=&quot;Unknown Record Types&quot;&gt;
</span><span class="lines">@@ -668,12 +668,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_unknownFieldElementsClean(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx">         self.assertEquals(set(service.unknownFieldElements), set())
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_unknownFieldElementsDirty(self):
</span><del>-        service = self._testService(xmlData=
</del><ins>+        service = self.service(xmlData=
</ins><span class="cx"> &quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;directory realm=&quot;Unknown Record Types&quot;&gt;
</span><span class="lines">@@ -690,7 +690,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_updateRecord(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         record = (yield service.recordWithUID(&quot;__wsanchez__&quot;))
</span><span class="cx"> 
</span><span class="lines">@@ -712,7 +712,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_addRecord(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         newRecord = DirectoryRecord(
</span><span class="cx">             service,
</span><span class="lines">@@ -736,7 +736,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_addRecordNoCreate(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         newRecord = DirectoryRecord(
</span><span class="cx">             service,
</span><span class="lines">@@ -752,7 +752,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_removeRecord(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         yield service.removeRecords((&quot;__wsanchez__&quot;,))
</span><span class="cx"> 
</span><span class="lines">@@ -765,7 +765,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def test_removeRecordNoExist(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         return service.removeRecords((&quot;__plugh__&quot;,))
</span><span class="cx"> 
</span><span class="lines">@@ -774,7 +774,7 @@
</span><span class="cx"> class DirectoryRecordTest(BaseTest, test_directory.DirectoryRecordTest):
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_members(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         record = (yield service.recordWithUID(&quot;__wsanchez__&quot;))
</span><span class="cx">         members = (yield record.members())
</span><span class="lines">@@ -806,7 +806,7 @@
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><span class="cx">     def test_groups(self):
</span><del>-        service = self._testService()
</del><ins>+        service = self.service()
</ins><span class="cx"> 
</span><span class="cx">         record = (yield service.recordWithUID(&quot;__wsanchez__&quot;))
</span><span class="cx">         groups = (yield record.groups())
</span></span></pre>
</div>
</div>

</body>
</html>