<!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>[12255] CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>lint cleanup</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunktwistedcaldavdirectorytesttest_ldapdirectorypy">CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunktwistedcaldavdirectorytesttest_ldapdirectorypy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py (12254 => 12255)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py        2014-01-07 03:49:51 UTC (rev 12254)
+++ CalendarServer/trunk/twistedcaldav/directory/test/test_ldapdirectory.py        2014-01-07 18:34:58 UTC (rev 12255)
</span><span class="lines">@@ -23,9 +23,13 @@
</span><span class="cx">     )
</span><span class="cx">     from twistedcaldav.directory.util import splitIntoBatches
</span><span class="cx">     from twistedcaldav.test.util import proxiesFile
</span><del>-    from twistedcaldav.directory.calendaruserproxyloader import XMLCalendarUserProxyLoader
</del><ins>+    from twistedcaldav.directory.calendaruserproxyloader import (
+        XMLCalendarUserProxyLoader
+    )
</ins><span class="cx">     from twistedcaldav.directory import calendaruserproxy
</span><del>-    from twistedcaldav.directory.directory import GroupMembershipCache, GroupMembershipCacheUpdater
</del><ins>+    from twistedcaldav.directory.directory import (
+        GroupMembershipCache, GroupMembershipCacheUpdater
+    )
</ins><span class="cx">     from twisted.internet.defer import inlineCallbacks
</span><span class="cx">     from string import maketrans
</span><span class="cx">     import ldap
</span><span class="lines">@@ -38,79 +42,79 @@
</span><span class="cx"> 
</span><span class="cx">         def test_buildFilter(self):
</span><span class="cx">             mapping = {
</span><del>-                &quot;recordName&quot; : &quot;uid&quot;,
-                &quot;fullName&quot; : &quot;cn&quot;,
-                &quot;emailAddresses&quot; : &quot;mail&quot;,
-                &quot;firstName&quot; : &quot;givenName&quot;,
-                &quot;lastName&quot; : &quot;sn&quot;,
-                &quot;guid&quot; : &quot;generateduid&quot;,
-                &quot;memberIDAttr&quot; : &quot;generateduid&quot;,
</del><ins>+                &quot;recordName&quot;: &quot;uid&quot;,
+                &quot;fullName&quot;: &quot;cn&quot;,
+                &quot;emailAddresses&quot;: &quot;mail&quot;,
+                &quot;firstName&quot;: &quot;givenName&quot;,
+                &quot;lastName&quot;: &quot;sn&quot;,
+                &quot;guid&quot;: &quot;generateduid&quot;,
+                &quot;memberIDAttr&quot;: &quot;generateduid&quot;,
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             entries = [
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;emailAddresses&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;firstName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;lastName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;)
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(|(cn=mor*)(mail=mor*)(givenName=mor*)(sn=mor*)))&quot;,
-                    &quot;optimize&quot; : False,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(|(cn=mor*)(mail=mor*)(givenName=mor*)(sn=mor*)))&quot;,
+                    &quot;optimize&quot;: False,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor(&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;emailAddresses&quot;, &quot;mor)&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                         (&quot;firstName&quot;, &quot;mor*&quot;, True, u&quot;exact&quot;),
</span><span class="cx">                         (&quot;lastName&quot;, &quot;mor\\&quot;, True, u&quot;starts-with&quot;)
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(|(cn=mor\\28*)(mail=*mor\\29*)(givenName=mor\\2a)(sn=mor\\5c*)))&quot;,
-                    &quot;optimize&quot; : False,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(|(cn=mor\\28*)(mail=*mor\\29*)(givenName=mor\\2a)(sn=mor\\5c*)))&quot;,
+                    &quot;optimize&quot;: False,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(cn=mor*))&quot;,
-                    &quot;optimize&quot; : False,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(cn=mor*))&quot;,
+                    &quot;optimize&quot;: False,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                         (&quot;emailAddresses&quot;, &quot;mor&quot;, True, u&quot;equals&quot;),
</span><span class="cx">                         (&quot;invalid&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;and&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(&amp;(cn=*mor*)(mail=mor)))&quot;,
-                    &quot;optimize&quot; : False,
</del><ins>+                    &quot;operand&quot;: &quot;and&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(&amp;(cn=*mor*)(mail=mor)))&quot;,
+                    &quot;optimize&quot;: False,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;invalid&quot;, &quot;mor&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                         (&quot;invalid&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;and&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : None,
-                    &quot;optimize&quot; : False,
</del><ins>+                    &quot;operand&quot;: &quot;and&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: None,
+                    &quot;optimize&quot;: False,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [ ],
-                    &quot;operand&quot; : &quot;and&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : None,
-                    &quot;optimize&quot; : False,
</del><ins>+                    &quot;fields&quot;: [],
+                    &quot;operand&quot;: &quot;and&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: None,
+                    &quot;optimize&quot;: False,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;fullName&quot;, &quot;sag&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;emailAddresses&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="lines">@@ -120,13 +124,13 @@
</span><span class="cx">                         (&quot;lastName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;lastName&quot;, &quot;sag&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;users&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(|(&amp;(givenName=mor*)(sn=sag*))(&amp;(givenName=sag*)(sn=mor*))))&quot;,
-                    &quot;optimize&quot; : True,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;users&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(|(&amp;(givenName=mor*)(sn=sag*))(&amp;(givenName=sag*)(sn=mor*))))&quot;,
+                    &quot;optimize&quot;: True,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;fullName&quot;, &quot;sag&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;emailAddresses&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="lines">@@ -136,13 +140,13 @@
</span><span class="cx">                         (&quot;lastName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;lastName&quot;, &quot;sag&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;groups&quot;,
-                    &quot;expected&quot; : None,
-                    &quot;optimize&quot; : True,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;groups&quot;,
+                    &quot;expected&quot;: None,
+                    &quot;optimize&quot;: True,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;fullName&quot;, &quot;sag&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;emailAddresses&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="lines">@@ -152,140 +156,141 @@
</span><span class="cx">                         (&quot;lastName&quot;, &quot;mor&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                         (&quot;lastName&quot;, &quot;sag&quot;, True, u&quot;starts-with&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;groups&quot;,
-                    &quot;expected&quot; : None,
-                    &quot;optimize&quot; : True,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;groups&quot;,
+                    &quot;expected&quot;: None,
+                    &quot;optimize&quot;: True,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;guid&quot;, &quot;xyzzy&quot;, True, u&quot;equals&quot;),
</span><span class="cx">                         (&quot;guid&quot;, &quot;plugh&quot;, True, u&quot;equals&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;groups&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(|(generateduid=xyzzy)(generateduid=plugh)))&quot;,
-                    &quot;optimize&quot; : True,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;groups&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(|(generateduid=xyzzy)(generateduid=plugh)))&quot;,
+                    &quot;optimize&quot;: True,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                         (&quot;fullName&quot;, &quot;sag&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;locations&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(|(cn=*mor*)(cn=*sag*)))&quot;,
-                    &quot;optimize&quot; : True,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;locations&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(|(cn=*mor*)(cn=*sag*)))&quot;,
+                    &quot;optimize&quot;: True,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;fields&quot; : [
</del><ins>+                    &quot;fields&quot;: [
</ins><span class="cx">                         (&quot;fullName&quot;, &quot;mor&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                         (&quot;fullName&quot;, &quot;sag&quot;, True, u&quot;contains&quot;),
</span><span class="cx">                     ],
</span><del>-                    &quot;operand&quot; : &quot;or&quot;,
-                    &quot;recordType&quot; : &quot;resources&quot;,
-                    &quot;expected&quot; : &quot;(&amp;(uid=*)(generateduid=*)(|(cn=*mor*)(cn=*sag*)))&quot;,
-                    &quot;optimize&quot; : True,
</del><ins>+                    &quot;operand&quot;: &quot;or&quot;,
+                    &quot;recordType&quot;: &quot;resources&quot;,
+                    &quot;expected&quot;: &quot;(&amp;(uid=*)(generateduid=*)(|(cn=*mor*)(cn=*sag*)))&quot;,
+                    &quot;optimize&quot;: True,
</ins><span class="cx">                 },
</span><span class="cx">             ]
</span><span class="cx">             for entry in entries:
</span><span class="cx">                 self.assertEquals(
</span><span class="cx">                     buildFilter(entry[&quot;recordType&quot;], mapping, entry[&quot;fields&quot;],
</span><del>-                        operand=entry[&quot;operand&quot;], optimizeMultiName=entry[&quot;optimize&quot;]),
</del><ins>+                                operand=entry[&quot;operand&quot;], optimizeMultiName=entry[&quot;optimize&quot;]),
</ins><span class="cx">                     entry[&quot;expected&quot;]
</span><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     class BuildFilterFromTokensTestCase(TestCase):
</span><span class="cx"> 
</span><span class="cx">         def test_buildFilterFromTokens(self):
</span><span class="cx"> 
</span><span class="cx">             entries = [
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(a=b)(|(cn=*foo*)(mail=foo*)))&quot;,
-                    &quot;extra&quot; : &quot;(a=b)&quot;,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(a=b)(|(cn=*foo*)(mail=foo*)))&quot;,
+                    &quot;extra&quot;: &quot;(a=b)&quot;,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;, &quot;foo&quot;, &quot;oo&quot;, &quot;fo&quot;, &quot;bar&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;, &quot;foo&quot;, &quot;oo&quot;, &quot;fo&quot;, &quot;bar&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(a=b)(|(cn=*bar*)(mail=bar*))(|(cn=*foo*)(mail=foo*)))&quot;,
-                    &quot;extra&quot; : &quot;(a=b)&quot;,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(a=b)(|(cn=*bar*)(mail=bar*))(|(cn=*foo*)(mail=foo*)))&quot;,
+                    &quot;extra&quot;: &quot;(a=b)&quot;,
</ins><span class="cx">                 },
</span><del>-               {
-                    &quot;tokens&quot; : [&quot;fo&quot;, &quot;foo&quot;, &quot;foooo&quot;, &quot;ooo&quot;, &quot;fooo&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                {
+                    &quot;tokens&quot;: [&quot;fo&quot;, &quot;foo&quot;, &quot;foooo&quot;, &quot;ooo&quot;, &quot;fooo&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(a=b)(|(cn=*foooo*)(mail=foooo*)))&quot;,
-                    &quot;extra&quot; : &quot;(a=b)&quot;,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(a=b)(|(cn=*foooo*)(mail=foooo*)))&quot;,
+                    &quot;extra&quot;: &quot;(a=b)&quot;,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;mailAliases&quot;],
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;mailAliases&quot;],
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(a=b)(|(cn=*foo*)(mail=foo*)(mailAliases=foo*)))&quot;,
-                    &quot;extra&quot; : &quot;(a=b)&quot;,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(a=b)(|(cn=*foo*)(mail=foo*)(mailAliases=foo*)))&quot;,
+                    &quot;extra&quot;: &quot;(a=b)&quot;,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                    &quot;tokens&quot;: [],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : None,
-                    &quot;extra&quot; : None,
</del><ins>+                    &quot;expected&quot;: None,
+                    &quot;extra&quot;: None,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;, &quot;bar&quot;],
-                    &quot;mapping&quot; : { },
-                    &quot;expected&quot; : None,
-                    &quot;extra&quot; : None,
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;, &quot;bar&quot;],
+                    &quot;mapping&quot;: {},
+                    &quot;expected&quot;: None,
+                    &quot;extra&quot;: None,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;, &quot;bar&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;, &quot;bar&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(mail=bar*)(mail=foo*))&quot;,
-                    &quot;extra&quot; : None,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(mail=bar*)(mail=foo*))&quot;,
+                    &quot;extra&quot;: None,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;, &quot;bar&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;, &quot;bar&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(|(cn=*bar*)(mail=bar*))(|(cn=*foo*)(mail=foo*)))&quot;,
-                    &quot;extra&quot; : None,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(|(cn=*bar*)(mail=bar*))(|(cn=*foo*)(mail=foo*)))&quot;,
+                    &quot;extra&quot;: None,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;, &quot;bar&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;mailAliases&quot;],
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;, &quot;bar&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;mailAliases&quot;],
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(|(cn=*bar*)(mail=bar*)(mailAliases=bar*))(|(cn=*foo*)(mail=foo*)(mailAliases=foo*)))&quot;,
-                    &quot;extra&quot; : None,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(|(cn=*bar*)(mail=bar*)(mailAliases=bar*))(|(cn=*foo*)(mail=foo*)(mailAliases=foo*)))&quot;,
+                    &quot;extra&quot;: None,
</ins><span class="cx">                 },
</span><span class="cx">                 {
</span><del>-                    &quot;tokens&quot; : [&quot;foo&quot;, &quot;bar&quot;, &quot;baz(&quot;],
-                    &quot;mapping&quot; : {
-                        &quot;fullName&quot; : &quot;cn&quot;,
-                        &quot;emailAddresses&quot; : &quot;mail&quot;,
</del><ins>+                    &quot;tokens&quot;: [&quot;foo&quot;, &quot;bar&quot;, &quot;baz(&quot;],
+                    &quot;mapping&quot;: {
+                        &quot;fullName&quot;: &quot;cn&quot;,
+                        &quot;emailAddresses&quot;: &quot;mail&quot;,
</ins><span class="cx">                     },
</span><del>-                    &quot;expected&quot; : &quot;(&amp;(|(cn=*bar*)(mail=bar*))(|(cn=*baz\\28*)(mail=baz\\28*))(|(cn=*foo*)(mail=foo*)))&quot;,
-                    &quot;extra&quot; : None,
</del><ins>+                    &quot;expected&quot;: &quot;(&amp;(|(cn=*bar*)(mail=bar*))(|(cn=*baz\\28*)(mail=baz\\28*))(|(cn=*foo*)(mail=foo*)))&quot;,
+                    &quot;extra&quot;: None,
</ins><span class="cx">                 },
</span><span class="cx">             ]
</span><span class="cx">             for entry in entries:
</span><span class="lines">@@ -295,12 +300,13 @@
</span><span class="cx">                 )
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     class StubList(object):
</span><span class="cx">         def __init__(self, wrapper):
</span><span class="cx">             self.ldap = wrapper
</span><span class="cx"> 
</span><span class="cx">         def startSearch(self, base, scope, filterstr, attrList=None,
</span><del>-            timeout=-1, sizelimit=0):
</del><ins>+                        timeout=-1, sizelimit=0):
</ins><span class="cx">             self.base = base
</span><span class="cx">             self.scope = scope
</span><span class="cx">             self.filterstr = filterstr
</span><span class="lines">@@ -310,14 +316,17 @@
</span><span class="cx"> 
</span><span class="cx">         def processResults(self):
</span><span class="cx">             self.allResults = self.ldap.search_s(self.base, self.scope,
</span><del>-                self.filterstr, attrlist=self.attrList)
</del><ins>+                                                 self.filterstr,
+                                                 attrlist=self.attrList)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     class StubAsync(object):
</span><span class="cx">         def List(self, wrapper):
</span><span class="cx">             return StubList(wrapper)
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     class LdapDirectoryTestWrapper(object):
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         A test stub which replaces search_s( ) with a version that will return
</span><span class="lines">@@ -335,7 +344,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         def search_s(self, base, scope, filterstr=&quot;(objectClass=*)&quot;,
</span><del>-            attrlist=None):
</del><ins>+                     attrlist=None):
</ins><span class="cx">             &quot;&quot;&quot; A simple implementation of LDAP search filter processing &quot;&quot;&quot;
</span><span class="cx"> 
</span><span class="cx">             base = normalizeDNstr(base)
</span><span class="lines">@@ -493,8 +502,8 @@
</span><span class="cx">                         'givenName': ['Test'],
</span><span class="cx">                         'cn': ['Test Resource'],
</span><span class="cx">                         # purposely throw in an un-normalized GUID
</span><del>-                        'read-write-proxy' : ['6423f94a-6b76-4a3a-815b-d52cfd77935d'],
-                        'read-only-proxy' : ['5A985493-EE2C-4665-94CF-4DFEA3A89500'],
</del><ins>+                        'read-write-proxy': ['6423f94a-6b76-4a3a-815b-d52cfd77935d'],
+                        'read-only-proxy': ['5A985493-EE2C-4665-94CF-4DFEA3A89500'],
</ins><span class="cx">                     }
</span><span class="cx">                 ),
</span><span class="cx">                 (
</span><span class="lines">@@ -505,14 +514,14 @@
</span><span class="cx">                         'sn': ['Resource2'],
</span><span class="cx">                         'givenName': ['Test'],
</span><span class="cx">                         'cn': ['Test Resource2'],
</span><del>-                        'read-write-proxy' : ['6423F94A-6B76-4A3A-815B-D52CFD77935D'],
</del><ins>+                        'read-write-proxy': ['6423F94A-6B76-4A3A-815B-D52CFD77935D'],
</ins><span class="cx">                     }
</span><span class="cx">                 ),
</span><span class="cx">             ),
</span><span class="cx">             {
</span><del>-                &quot;augmentService&quot; : None,
-                &quot;groupMembershipCache&quot; : None,
-                &quot;cacheTimeout&quot;: 1, # Minutes
</del><ins>+                &quot;augmentService&quot;: None,
+                &quot;groupMembershipCache&quot;: None,
+                &quot;cacheTimeout&quot;: 1,  # Minutes
</ins><span class="cx">                 &quot;negativeCaching&quot;: False,
</span><span class="cx">                 &quot;warningThresholdSeconds&quot;: 3,
</span><span class="cx">                 &quot;batchSize&quot;: 500,
</span><span class="lines">@@ -524,7 +533,7 @@
</span><span class="cx">                 &quot;tls&quot;: False,
</span><span class="cx">                 &quot;tlsCACertFile&quot;: None,
</span><span class="cx">                 &quot;tlsCACertDir&quot;: None,
</span><del>-                &quot;tlsRequireCert&quot;: None, # never, allow, try, demand, hard
</del><ins>+                &quot;tlsRequireCert&quot;: None,  # never, allow, try, demand, hard
</ins><span class="cx">                 &quot;credentials&quot;: {
</span><span class="cx">                     &quot;dn&quot;: None,
</span><span class="cx">                     &quot;password&quot;: None,
</span><span class="lines">@@ -535,83 +544,83 @@
</span><span class="cx">                     &quot;guidAttr&quot;: &quot;apple-generateduid&quot;,
</span><span class="cx">                     &quot;users&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Users&quot;,
</span><del>-                        &quot;attr&quot;: &quot;uid&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;loginEnabledAttr&quot; : &quot;&quot;, # attribute controlling login
-                        &quot;loginEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;calendarEnabledAttr&quot; : &quot;enable-calendar&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;uid&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;loginEnabledAttr&quot;: &quot;&quot;,  # attribute controlling login
+                        &quot;loginEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;calendarEnabledAttr&quot;: &quot;enable-calendar&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;uid&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;groups&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Groups&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;locations&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Places&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;associatedAddressAttr&quot; : &quot;assocAddr&quot;,
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;associatedAddressAttr&quot;: &quot;assocAddr&quot;,
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : &quot;&quot;, # old style, single string
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: &quot;&quot;,  # old style, single string
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;resources&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Resources&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [], # new style, array
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [],  # new style, array
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;addresses&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Buildings&quot;,
</span><del>-                        &quot;geoAttr&quot; : &quot;coordinates&quot;,
-                        &quot;streetAddressAttr&quot; : &quot;postal&quot;,
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;geoAttr&quot;: &quot;coordinates&quot;,
+                        &quot;streetAddressAttr&quot;: &quot;postal&quot;,
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                 },
</span><span class="cx">                 &quot;groupSchema&quot;: {
</span><del>-                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;, # how members are specified
-                    &quot;nestedGroupsAttr&quot;: &quot;nestedGroups&quot;, # how nested groups are specified
-                    &quot;memberIdAttr&quot;: &quot;&quot;, # which attribute the above refer to
</del><ins>+                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;,  # how members are specified
+                    &quot;nestedGroupsAttr&quot;: &quot;nestedGroups&quot;,  # how nested groups are specified
+                    &quot;memberIdAttr&quot;: &quot;&quot;,  # which attribute the above refer to
</ins><span class="cx">                 },
</span><span class="cx">                 &quot;resourceSchema&quot;: {
</span><del>-                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;, # contains location/resource info
</del><ins>+                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;,  # contains location/resource info
</ins><span class="cx">                     &quot;autoScheduleAttr&quot;: None,
</span><span class="cx">                     &quot;proxyAttr&quot;: &quot;read-write-proxy&quot;,
</span><span class="cx">                     &quot;readOnlyProxyAttr&quot;: &quot;read-only-proxy&quot;,
</span><span class="cx">                     &quot;autoAcceptGroupAttr&quot;: None,
</span><span class="cx">                 },
</span><span class="cx">                 &quot;poddingSchema&quot;: {
</span><del>-                    &quot;serverIdAttr&quot;: &quot;server-id&quot;, # maps to augments server-id
</del><ins>+                    &quot;serverIdAttr&quot;: &quot;server-id&quot;,  # maps to augments server-id
</ins><span class="cx">                 },
</span><span class="cx">             }
</span><span class="cx">         )
</span><span class="lines">@@ -729,9 +738,9 @@
</span><span class="cx">                 ),
</span><span class="cx">             ),
</span><span class="cx">             {
</span><del>-                &quot;augmentService&quot; : None,
-                &quot;groupMembershipCache&quot; : None,
-                &quot;cacheTimeout&quot;: 1, # Minutes
</del><ins>+                &quot;augmentService&quot;: None,
+                &quot;groupMembershipCache&quot;: None,
+                &quot;cacheTimeout&quot;: 1,  # Minutes
</ins><span class="cx">                 &quot;negativeCaching&quot;: False,
</span><span class="cx">                 &quot;warningThresholdSeconds&quot;: 3,
</span><span class="cx">                 &quot;batchSize&quot;: 500,
</span><span class="lines">@@ -743,7 +752,7 @@
</span><span class="cx">                 &quot;tls&quot;: False,
</span><span class="cx">                 &quot;tlsCACertFile&quot;: None,
</span><span class="cx">                 &quot;tlsCACertDir&quot;: None,
</span><del>-                &quot;tlsRequireCert&quot;: None, # never, allow, try, demand, hard
</del><ins>+                &quot;tlsRequireCert&quot;: None,  # never, allow, try, demand, hard
</ins><span class="cx">                 &quot;credentials&quot;: {
</span><span class="cx">                     &quot;dn&quot;: None,
</span><span class="cx">                     &quot;password&quot;: None,
</span><span class="lines">@@ -754,79 +763,79 @@
</span><span class="cx">                     &quot;guidAttr&quot;: &quot;apple-generateduid&quot;,
</span><span class="cx">                     &quot;users&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Users&quot;,
</span><del>-                        &quot;attr&quot;: &quot;uid&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;loginEnabledAttr&quot; : &quot;&quot;, # attribute controlling login
-                        &quot;loginEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;calendarEnabledAttr&quot; : &quot;enable-calendar&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;uid&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;loginEnabledAttr&quot;: &quot;&quot;,  # attribute controlling login
+                        &quot;loginEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;calendarEnabledAttr&quot;: &quot;enable-calendar&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;uid&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;groups&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Groups&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;locations&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Places&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : &quot;&quot;, # old style, single string
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: &quot;&quot;,  # old style, single string
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;resources&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Resources&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [], # new style, array
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [],  # new style, array
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                 },
</span><span class="cx">                 &quot;groupSchema&quot;: {
</span><del>-                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;, # how members are specified
-                    &quot;nestedGroupsAttr&quot;: &quot;&quot;, # how nested groups are specified
-                    &quot;memberIdAttr&quot;: &quot;&quot;, # which attribute the above refer to
</del><ins>+                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;,  # how members are specified
+                    &quot;nestedGroupsAttr&quot;: &quot;&quot;,  # how nested groups are specified
+                    &quot;memberIdAttr&quot;: &quot;&quot;,  # which attribute the above refer to
</ins><span class="cx">                 },
</span><span class="cx">                 &quot;resourceSchema&quot;: {
</span><del>-                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;, # contains location/resource info
</del><ins>+                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;,  # contains location/resource info
</ins><span class="cx">                     &quot;autoScheduleAttr&quot;: None,
</span><span class="cx">                     &quot;proxyAttr&quot;: None,
</span><span class="cx">                     &quot;readOnlyProxyAttr&quot;: None,
</span><span class="cx">                     &quot;autoAcceptGroupAttr&quot;: None,
</span><span class="cx">                 },
</span><span class="cx">                 &quot;poddingSchema&quot;: {
</span><del>-                    &quot;serverIdAttr&quot;: &quot;server-id&quot;, # maps to augments server-id
</del><ins>+                    &quot;serverIdAttr&quot;: &quot;server-id&quot;,  # maps to augments server-id
</ins><span class="cx">                 },
</span><span class="cx">             }
</span><span class="cx">         )
</span><span class="lines">@@ -946,9 +955,9 @@
</span><span class="cx">                 ),
</span><span class="cx">             ),
</span><span class="cx">             {
</span><del>-                &quot;augmentService&quot; : None,
-                &quot;groupMembershipCache&quot; : None,
-                &quot;cacheTimeout&quot;: 1, # Minutes
</del><ins>+                &quot;augmentService&quot;: None,
+                &quot;groupMembershipCache&quot;: None,
+                &quot;cacheTimeout&quot;: 1,  # Minutes
</ins><span class="cx">                 &quot;negativeCaching&quot;: False,
</span><span class="cx">                 &quot;warningThresholdSeconds&quot;: 3,
</span><span class="cx">                 &quot;batchSize&quot;: 500,
</span><span class="lines">@@ -960,7 +969,7 @@
</span><span class="cx">                 &quot;tls&quot;: False,
</span><span class="cx">                 &quot;tlsCACertFile&quot;: None,
</span><span class="cx">                 &quot;tlsCACertDir&quot;: None,
</span><del>-                &quot;tlsRequireCert&quot;: None, # never, allow, try, demand, hard
</del><ins>+                &quot;tlsRequireCert&quot;: None,  # never, allow, try, demand, hard
</ins><span class="cx">                 &quot;credentials&quot;: {
</span><span class="cx">                     &quot;dn&quot;: None,
</span><span class="cx">                     &quot;password&quot;: None,
</span><span class="lines">@@ -971,79 +980,79 @@
</span><span class="cx">                     &quot;guidAttr&quot;: &quot;apple-generateduid&quot;,
</span><span class="cx">                     &quot;users&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Users&quot;,
</span><del>-                        &quot;attr&quot;: &quot;uid&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;loginEnabledAttr&quot; : &quot;&quot;, # attribute controlling login
-                        &quot;loginEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;calendarEnabledAttr&quot; : &quot;enable-calendar&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;uid&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;loginEnabledAttr&quot;: &quot;&quot;,  # attribute controlling login
+                        &quot;loginEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;calendarEnabledAttr&quot;: &quot;enable-calendar&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;uid&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;groups&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Groups&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;locations&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Places&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : &quot;&quot;, # old style, single string
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: &quot;&quot;,  # old style, single string
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;resources&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Resources&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [], # new style, array
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [],  # new style, array
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                 },
</span><span class="cx">                 &quot;groupSchema&quot;: {
</span><del>-                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;, # how members are specified
-                    &quot;nestedGroupsAttr&quot;: &quot;nestedGroups&quot;, # how nested groups are specified
-                    &quot;memberIdAttr&quot;: &quot;apple-generateduid&quot;, # which attribute the above refer to
</del><ins>+                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;,  # how members are specified
+                    &quot;nestedGroupsAttr&quot;: &quot;nestedGroups&quot;,  # how nested groups are specified
+                    &quot;memberIdAttr&quot;: &quot;apple-generateduid&quot;,  # which attribute the above refer to
</ins><span class="cx">                 },
</span><span class="cx">                 &quot;resourceSchema&quot;: {
</span><del>-                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;, # contains location/resource info
</del><ins>+                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;,  # contains location/resource info
</ins><span class="cx">                     &quot;autoScheduleAttr&quot;: None,
</span><span class="cx">                     &quot;proxyAttr&quot;: None,
</span><span class="cx">                     &quot;readOnlyProxyAttr&quot;: None,
</span><span class="cx">                     &quot;autoAcceptGroupAttr&quot;: None,
</span><span class="cx">                 },
</span><span class="cx">                 &quot;poddingSchema&quot;: {
</span><del>-                    &quot;serverIdAttr&quot;: &quot;server-id&quot;, # maps to augments server-id
</del><ins>+                    &quot;serverIdAttr&quot;: &quot;server-id&quot;,  # maps to augments server-id
</ins><span class="cx">                 },
</span><span class="cx">             }
</span><span class="cx">         )
</span><span class="lines">@@ -1159,9 +1168,9 @@
</span><span class="cx">                 ),
</span><span class="cx">             ),
</span><span class="cx">             {
</span><del>-                &quot;augmentService&quot; : None,
-                &quot;groupMembershipCache&quot; : None,
-                &quot;cacheTimeout&quot;: 1, # Minutes
</del><ins>+                &quot;augmentService&quot;: None,
+                &quot;groupMembershipCache&quot;: None,
+                &quot;cacheTimeout&quot;: 1,  # Minutes
</ins><span class="cx">                 &quot;negativeCaching&quot;: False,
</span><span class="cx">                 &quot;warningThresholdSeconds&quot;: 3,
</span><span class="cx">                 &quot;batchSize&quot;: 500,
</span><span class="lines">@@ -1173,7 +1182,7 @@
</span><span class="cx">                 &quot;tls&quot;: False,
</span><span class="cx">                 &quot;tlsCACertFile&quot;: None,
</span><span class="cx">                 &quot;tlsCACertDir&quot;: None,
</span><del>-                &quot;tlsRequireCert&quot;: None, # never, allow, try, demand, hard
</del><ins>+                &quot;tlsRequireCert&quot;: None,  # never, allow, try, demand, hard
</ins><span class="cx">                 &quot;credentials&quot;: {
</span><span class="cx">                     &quot;dn&quot;: None,
</span><span class="cx">                     &quot;password&quot;: None,
</span><span class="lines">@@ -1184,79 +1193,79 @@
</span><span class="cx">                     &quot;guidAttr&quot;: &quot;apple-generateduid&quot;,
</span><span class="cx">                     &quot;users&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Users&quot;,
</span><del>-                        &quot;attr&quot;: &quot;uid&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;loginEnabledAttr&quot; : &quot;&quot;, # attribute controlling login
-                        &quot;loginEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;calendarEnabledAttr&quot; : &quot;enable-calendar&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;uid&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;loginEnabledAttr&quot;: &quot;&quot;,  # attribute controlling login
+                        &quot;loginEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;calendarEnabledAttr&quot;: &quot;enable-calendar&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;uid&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;groups&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Groups&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;&quot;, # additional filter for this type
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;&quot;,  # additional filter for this type
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [&quot;mail&quot;, &quot;emailAliases&quot;],
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [&quot;mail&quot;, &quot;emailAliases&quot;],
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;locations&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Places&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : &quot;&quot;, # old style, single string
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: &quot;&quot;,  # old style, single string
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                     &quot;resources&quot;: {
</span><span class="cx">                         &quot;rdn&quot;: &quot;cn=Resources&quot;,
</span><del>-                        &quot;attr&quot;: &quot;cn&quot;, # used only to synthesize email address
-                        &quot;emailSuffix&quot;: None, # used only to synthesize email address
-                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;, # additional filter for this type
-                        &quot;calendarEnabledAttr&quot; : &quot;&quot;, # attribute controlling calendaring
-                        &quot;calendarEnabledValue&quot; : &quot;yes&quot;, # &quot;True&quot; value of above attribute
-                        &quot;mapping&quot;: { # maps internal record names to LDAP
</del><ins>+                        &quot;attr&quot;: &quot;cn&quot;,  # used only to synthesize email address
+                        &quot;emailSuffix&quot;: None,  # used only to synthesize email address
+                        &quot;filter&quot;: &quot;(objectClass=apple-resource)&quot;,  # additional filter for this type
+                        &quot;calendarEnabledAttr&quot;: &quot;&quot;,  # attribute controlling calendaring
+                        &quot;calendarEnabledValue&quot;: &quot;yes&quot;,  # &quot;True&quot; value of above attribute
+                        &quot;mapping&quot;: {  # maps internal record names to LDAP
</ins><span class="cx">                             &quot;recordName&quot;: &quot;cn&quot;,
</span><del>-                            &quot;fullName&quot; : &quot;cn&quot;,
-                            &quot;emailAddresses&quot; : [], # new style, array
-                            &quot;firstName&quot; : &quot;givenName&quot;,
-                            &quot;lastName&quot; : &quot;sn&quot;,
</del><ins>+                            &quot;fullName&quot;: &quot;cn&quot;,
+                            &quot;emailAddresses&quot;: [],  # new style, array
+                            &quot;firstName&quot;: &quot;givenName&quot;,
+                            &quot;lastName&quot;: &quot;sn&quot;,
</ins><span class="cx">                         },
</span><span class="cx">                     },
</span><span class="cx">                 },
</span><span class="cx">                 &quot;groupSchema&quot;: {
</span><del>-                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;, # how members are specified
-                    &quot;nestedGroupsAttr&quot;: &quot;&quot;, # how nested groups are specified
-                    &quot;memberIdAttr&quot;: &quot;apple-generateduid&quot;, # which attribute the above refer to
</del><ins>+                    &quot;membersAttr&quot;: &quot;uniqueMember&quot;,  # how members are specified
+                    &quot;nestedGroupsAttr&quot;: &quot;&quot;,  # how nested groups are specified
+                    &quot;memberIdAttr&quot;: &quot;apple-generateduid&quot;,  # which attribute the above refer to
</ins><span class="cx">                 },
</span><span class="cx">                 &quot;resourceSchema&quot;: {
</span><del>-                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;, # contains location/resource info
</del><ins>+                    &quot;resourceInfoAttr&quot;: &quot;apple-resource-info&quot;,  # contains location/resource info
</ins><span class="cx">                     &quot;autoScheduleAttr&quot;: None,
</span><span class="cx">                     &quot;proxyAttr&quot;: None,
</span><span class="cx">                     &quot;readOnlyProxyAttr&quot;: None,
</span><span class="cx">                     &quot;autoAcceptGroupAttr&quot;: None,
</span><span class="cx">                 },
</span><span class="cx">                 &quot;poddingSchema&quot;: {
</span><del>-                    &quot;serverIdAttr&quot;: &quot;server-id&quot;, # maps to augments server-id
</del><ins>+                    &quot;serverIdAttr&quot;: &quot;server-id&quot;,  # maps to augments server-id
</ins><span class="cx">                 },
</span><span class="cx">             }
</span><span class="cx">         )
</span><span class="lines">@@ -1304,11 +1313,14 @@
</span><span class="cx">                 'cn': ['Amanda Test']
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_users)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_users
+            )
</ins><span class="cx">             self.assertEquals(record.guid, guid)
</span><del>-            self.assertEquals(record.emailAddresses,
-                set(['alternate@example.com', 'odtestamanda@example.com']))
</del><ins>+            self.assertEquals(
+                record.emailAddresses,
+                set(['alternate@example.com', 'odtestamanda@example.com'])
+            )
</ins><span class="cx">             self.assertEquals(record.shortNames, ('odtestamanda',))
</span><span class="cx">             self.assertEquals(record.fullName, 'Amanda Test')
</span><span class="cx">             self.assertEquals(record.firstName, 'Amanda')
</span><span class="lines">@@ -1330,8 +1342,9 @@
</span><span class="cx">                 'cn': ['Amanda Test']
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_users)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_users
+            )
</ins><span class="cx">             self.assertTrue(record.enabledForCalendaring)
</span><span class="cx"> 
</span><span class="cx">             # User with &quot;podding&quot; info
</span><span class="lines">@@ -1342,11 +1355,12 @@
</span><span class="cx">                 'uid': ['odtestamanda'],
</span><span class="cx">                 'apple-generateduid': [guid],
</span><span class="cx">                 'cn': ['Amanda Test'],
</span><del>-                'server-id' : [&quot;test-server-id&quot;],
</del><ins>+                'server-id': [&quot;test-server-id&quot;],
</ins><span class="cx">             }
</span><span class="cx"> 
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_users)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_users
+            )
</ins><span class="cx">             self.assertEquals(record.serverID, &quot;test-server-id&quot;)
</span><span class="cx"> 
</span><span class="cx">             # User missing guidAttr
</span><span class="lines">@@ -1357,9 +1371,11 @@
</span><span class="cx">                 'cn': ['Amanda Test'],
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            self.assertRaises(MissingGuidException,
</del><ins>+            self.assertRaises(
+                MissingGuidException,
</ins><span class="cx">                 self.service._ldapResultToRecord, dn, attrs,
</span><del>-                self.service.recordType_users)
</del><ins>+                self.service.recordType_users
+            )
</ins><span class="cx"> 
</span><span class="cx">             # User missing record name
</span><span class="cx"> 
</span><span class="lines">@@ -1369,9 +1385,11 @@
</span><span class="cx">                 'cn': ['Amanda Test'],
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            self.assertRaises(MissingRecordNameException,
</del><ins>+            self.assertRaises(
+                MissingRecordNameException,
</ins><span class="cx">                 self.service._ldapResultToRecord, dn, attrs,
</span><del>-                self.service.recordType_users)
</del><ins>+                self.service.recordType_users
+            )
</ins><span class="cx"> 
</span><span class="cx">             # Group with direct user members and nested group
</span><span class="cx"> 
</span><span class="lines">@@ -1379,23 +1397,26 @@
</span><span class="cx">             guid = '6C6CD280-E6E3-11DF-9492-0800200C9A66'
</span><span class="cx">             attrs = {
</span><span class="cx">                 'apple-generateduid': [guid],
</span><del>-                'uniqueMember':
</del><ins>+                'uniqueMember': [
+                    'uid=odtestamanda,cn=users,dc=example,dc=com',
+                    'uid=odtestbetty,cn=users,dc=example,dc=com',
+                    'cn=odtestgroupb,cn=groups,dc=example,dc=com',
+                ],
+                'cn': ['odtestgrouptop']
+            }
+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_groups
+            )
+            self.assertEquals(record.guid, guid)
+            self.assertEquals(
+                record.memberGUIDs(),
+                set(
</ins><span class="cx">                     [
</span><ins>+                        'cn=odtestgroupb,cn=groups,dc=example,dc=com',
</ins><span class="cx">                         'uid=odtestamanda,cn=users,dc=example,dc=com',
</span><span class="cx">                         'uid=odtestbetty,cn=users,dc=example,dc=com',
</span><del>-                        'cn=odtestgroupb,cn=groups,dc=example,dc=com',
-                    ],
-                'cn': ['odtestgrouptop']
-            }
-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_groups)
-            self.assertEquals(record.guid, guid)
-            self.assertEquals(record.memberGUIDs(),
-                set([
-                     'cn=odtestgroupb,cn=groups,dc=example,dc=com',
-                     'uid=odtestamanda,cn=users,dc=example,dc=com',
-                     'uid=odtestbetty,cn=users,dc=example,dc=com',
-                     ])
</del><ins>+                    ]
+                )
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">             # Group with illegal DN value in members
</span><span class="lines">@@ -1404,22 +1425,25 @@
</span><span class="cx">             guid = '6C6CD280-E6E3-11DF-9492-0800200C9A66'
</span><span class="cx">             attrs = {
</span><span class="cx">                 'apple-generateduid': [guid],
</span><del>-                'uniqueMember':
-                    [
-                        'uid=odtestamanda,cn=users,dc=example,dc=com',
-                        'uid=odtestbetty ,cn=users,dc=example,dc=com',
-                        'cn=odtestgroupb+foo,cn=groups,dc=example,dc=com',
-                    ],
</del><ins>+                'uniqueMember': [
+                    'uid=odtestamanda,cn=users,dc=example,dc=com',
+                    'uid=odtestbetty ,cn=users,dc=example,dc=com',
+                    'cn=odtestgroupb+foo,cn=groups,dc=example,dc=com',
+                ],
</ins><span class="cx">                 'cn': ['odtestgrouptop']
</span><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_groups)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_groups
+            )
</ins><span class="cx">             self.assertEquals(record.guid, guid)
</span><del>-            self.assertEquals(record.memberGUIDs(),
-                set([
-                     'uid=odtestamanda,cn=users,dc=example,dc=com',
-                     'uid=odtestbetty,cn=users,dc=example,dc=com',
-                     ])
</del><ins>+            self.assertEquals(
+                record.memberGUIDs(),
+                set(
+                    [
+                        'uid=odtestamanda,cn=users,dc=example,dc=com',
+                        'uid=odtestbetty,cn=users,dc=example,dc=com',
+                    ]
+                )
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">             # Resource with delegates, autoSchedule = True, and autoAcceptGroup
</span><span class="lines">@@ -1447,16 +1471,22 @@
</span><span class="cx"> &lt;/dict&gt;
</span><span class="cx"> &lt;/plist&gt;&quot;&quot;&quot;]
</span><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_resources)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_resources
+            )
</ins><span class="cx">             self.assertEquals(record.guid, guid)
</span><del>-            self.assertEquals(record.externalProxies(),
-                set(['6C6CD280-E6E3-11DF-9492-0800200C9A66']))
-            self.assertEquals(record.externalReadOnlyProxies(),
-                set(['6AA1AE12-592F-4190-A069-547CD83C47C0']))
</del><ins>+            self.assertEquals(
+                record.externalProxies(),
+                set(['6C6CD280-E6E3-11DF-9492-0800200C9A66'])
+            )
+            self.assertEquals(
+                record.externalReadOnlyProxies(),
+                set(['6AA1AE12-592F-4190-A069-547CD83C47C0'])
+            )
</ins><span class="cx">             self.assertTrue(record.autoSchedule)
</span><del>-            self.assertEquals(record.autoAcceptGroup,
-                '77A8EB52-AA2A-42ED-8843-B2BEE863AC70')
</del><ins>+            self.assertEquals(
+                record.autoAcceptGroup, '77A8EB52-AA2A-42ED-8843-B2BEE863AC70'
+            )
</ins><span class="cx"> 
</span><span class="cx">             # Resource with no delegates and autoSchedule = False
</span><span class="cx"> 
</span><span class="lines">@@ -1477,25 +1507,24 @@
</span><span class="cx"> &lt;/dict&gt;
</span><span class="cx"> &lt;/plist&gt;&quot;&quot;&quot;]
</span><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_resources)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_resources
+            )
</ins><span class="cx">             self.assertEquals(record.guid, guid)
</span><del>-            self.assertEquals(record.externalProxies(),
-                set())
-            self.assertEquals(record.externalReadOnlyProxies(),
-                set())
</del><ins>+            self.assertEquals(record.externalProxies(), set())
+            self.assertEquals(record.externalReadOnlyProxies(), set())
</ins><span class="cx">             self.assertFalse(record.autoSchedule)
</span><span class="cx">             self.assertEquals(record.autoAcceptGroup, &quot;&quot;)
</span><span class="cx"> 
</span><span class="cx">             # Now switch off the resourceInfoAttr and switch to individual
</span><span class="cx">             # attributes...
</span><span class="cx">             self.service.resourceSchema = {
</span><del>-                &quot;resourceInfoAttr&quot; : &quot;&quot;,
-                &quot;autoScheduleAttr&quot; : &quot;auto-schedule&quot;,
-                &quot;autoScheduleEnabledValue&quot; : &quot;yes&quot;,
-                &quot;proxyAttr&quot; : &quot;proxy&quot;,
-                &quot;readOnlyProxyAttr&quot; : &quot;read-only-proxy&quot;,
-                &quot;autoAcceptGroupAttr&quot; : &quot;auto-accept-group&quot;,
</del><ins>+                &quot;resourceInfoAttr&quot;: &quot;&quot;,
+                &quot;autoScheduleAttr&quot;: &quot;auto-schedule&quot;,
+                &quot;autoScheduleEnabledValue&quot;: &quot;yes&quot;,
+                &quot;proxyAttr&quot;: &quot;proxy&quot;,
+                &quot;readOnlyProxyAttr&quot;: &quot;read-only-proxy&quot;,
+                &quot;autoAcceptGroupAttr&quot;: &quot;auto-accept-group&quot;,
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # Resource with delegates and autoSchedule = True
</span><span class="lines">@@ -1505,21 +1534,28 @@
</span><span class="cx">             attrs = {
</span><span class="cx">                 'apple-generateduid': [guid],
</span><span class="cx">                 'cn': ['odtestresource'],
</span><del>-                'auto-schedule' : ['yes'],
-                'proxy' : ['6C6CD280-E6E3-11DF-9492-0800200C9A66'],
-                'read-only-proxy' : ['6AA1AE12-592F-4190-A069-547CD83C47C0'],
-                'auto-accept-group' : ['77A8EB52-AA2A-42ED-8843-B2BEE863AC70'],
</del><ins>+                'auto-schedule': ['yes'],
+                'proxy': ['6C6CD280-E6E3-11DF-9492-0800200C9A66'],
+                'read-only-proxy': ['6AA1AE12-592F-4190-A069-547CD83C47C0'],
+                'auto-accept-group': ['77A8EB52-AA2A-42ED-8843-B2BEE863AC70'],
</ins><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_resources)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_resources
+            )
</ins><span class="cx">             self.assertEquals(record.guid, guid)
</span><del>-            self.assertEquals(record.externalProxies(),
-                set(['6C6CD280-E6E3-11DF-9492-0800200C9A66']))
-            self.assertEquals(record.externalReadOnlyProxies(),
-                set(['6AA1AE12-592F-4190-A069-547CD83C47C0']))
</del><ins>+            self.assertEquals(
+                record.externalProxies(),
+                set(['6C6CD280-E6E3-11DF-9492-0800200C9A66'])
+            )
+            self.assertEquals(
+                record.externalReadOnlyProxies(),
+                set(['6AA1AE12-592F-4190-A069-547CD83C47C0'])
+            )
</ins><span class="cx">             self.assertTrue(record.autoSchedule)
</span><del>-            self.assertEquals(record.autoAcceptGroup,
-                '77A8EB52-AA2A-42ED-8843-B2BEE863AC70')
</del><ins>+            self.assertEquals(
+                record.autoAcceptGroup,
+                '77A8EB52-AA2A-42ED-8843-B2BEE863AC70'
+            )
</ins><span class="cx"> 
</span><span class="cx">             # Record with lowercase guid
</span><span class="cx">             dn = &quot;uid=odtestamanda,cn=users,dc=example,dc=com&quot;
</span><span class="lines">@@ -1532,8 +1568,9 @@
</span><span class="cx">                 'givenName': ['Amanda'],
</span><span class="cx">                 'cn': ['Amanda Test']
</span><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_users)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_users
+            )
</ins><span class="cx">             self.assertEquals(record.guid, guid.upper())
</span><span class="cx"> 
</span><span class="cx">             # Location with associated Address
</span><span class="lines">@@ -1543,14 +1580,15 @@
</span><span class="cx">             attrs = {
</span><span class="cx">                 &quot;apple-generateduid&quot;: [guid],
</span><span class="cx">                 &quot;cn&quot;: [&quot;odtestlocation&quot;],
</span><del>-                &quot;assocAddr&quot; : [&quot;6C6CD280-E6E3-11DF-9492-0800200C9A66&quot;],
</del><ins>+                &quot;assocAddr&quot;: [&quot;6C6CD280-E6E3-11DF-9492-0800200C9A66&quot;],
</ins><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_locations)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_locations
+            )
</ins><span class="cx">             self.assertEquals(record.extras, {
</span><span class="cx">                 &quot;associatedAddress&quot;: &quot;6C6CD280-E6E3-11DF-9492-0800200C9A66&quot;
</span><span class="cx">             })
</span><del>-           
</del><ins>+
</ins><span class="cx">             # Address with street and geo
</span><span class="cx"> 
</span><span class="cx">             dn = &quot;cn=odtestaddress,cn=buildings,dc=example,dc=com&quot;
</span><span class="lines">@@ -1558,16 +1596,16 @@
</span><span class="cx">             attrs = {
</span><span class="cx">                 &quot;apple-generateduid&quot;: [guid],
</span><span class="cx">                 &quot;cn&quot;: [&quot;odtestaddress&quot;],
</span><del>-                &quot;coordinates&quot; : [&quot;geo:1,2&quot;],
-                &quot;postal&quot; : [&quot;1 Infinite Loop, Cupertino, CA&quot;],
</del><ins>+                &quot;coordinates&quot;: [&quot;geo:1,2&quot;],
+                &quot;postal&quot;: [&quot;1 Infinite Loop, Cupertino, CA&quot;],
</ins><span class="cx">             }
</span><del>-            record = self.service._ldapResultToRecord(dn, attrs,
-                self.service.recordType_addresses)
</del><ins>+            record = self.service._ldapResultToRecord(
+                dn, attrs, self.service.recordType_addresses
+            )
</ins><span class="cx">             self.assertEquals(record.extras, {
</span><span class="cx">                 &quot;geo&quot;: &quot;geo:1,2&quot;,
</span><del>-                &quot;streetAddress&quot; : &quot;1 Infinite Loop, Cupertino, CA&quot;,
</del><ins>+                &quot;streetAddress&quot;: &quot;1 Infinite Loop, Cupertino, CA&quot;,
</ins><span class="cx">             })
</span><del>-           
</del><span class="cx"> 
</span><span class="cx">         def test_listRecords(self):
</span><span class="cx">             &quot;&quot;&quot;
</span><span class="lines">@@ -1580,7 +1618,7 @@
</span><span class="cx">             self.assertEquals(len(records), 4)
</span><span class="cx">             self.assertEquals(
</span><span class="cx">                 set([r.firstName for r in records]),
</span><del>-                set([&quot;Amanda&quot;, &quot;Betty&quot;, &quot;Cyrus&quot;, &quot;Wilfredo&quot;]) # Carlene is skipped because no guid in LDAP
</del><ins>+                set([&quot;Amanda&quot;, &quot;Betty&quot;, &quot;Cyrus&quot;, &quot;Wilfredo&quot;])  # Carlene is skipped because no guid in LDAP
</ins><span class="cx">             )
</span><span class="cx"> 
</span><span class="cx">         def test_restrictedPrincipalsUsingDN(self):
</span><span class="lines">@@ -1592,18 +1630,20 @@
</span><span class="cx">             for scenario in (
</span><span class="cx">                 self.nestedUsingSameAttributeUsingDN,
</span><span class="cx">                 self.nestedUsingDifferentAttributeUsingDN,
</span><del>-                ):
</del><ins>+            ):
</ins><span class="cx">                 self.setupService(scenario)
</span><span class="cx"> 
</span><span class="cx">                 self.assertEquals(
</span><del>-                    set([
-                        &quot;cn=left_coast,cn=groups,dc=example,dc=com&quot;,
-                        &quot;cn=right_coast,cn=groups,dc=example,dc=com&quot;,
-                        &quot;uid=cdaboo,cn=users,dc=example,dc=com&quot;,
-                        &quot;uid=dreid,cn=users,dc=example,dc=com&quot;,
-                        &quot;uid=lecroy,cn=users,dc=example,dc=com&quot;,
-                        &quot;uid=wsanchez,cn=users,dc=example,dc=com&quot;,
-                    ]),
</del><ins>+                    set(
+                        [
+                            &quot;cn=left_coast,cn=groups,dc=example,dc=com&quot;,
+                            &quot;cn=right_coast,cn=groups,dc=example,dc=com&quot;,
+                            &quot;uid=cdaboo,cn=users,dc=example,dc=com&quot;,
+                            &quot;uid=dreid,cn=users,dc=example,dc=com&quot;,
+                            &quot;uid=lecroy,cn=users,dc=example,dc=com&quot;,
+                            &quot;uid=wsanchez,cn=users,dc=example,dc=com&quot;,
+                        ]
+                    ),
</ins><span class="cx">                     self.service.restrictedPrincipals)
</span><span class="cx"> 
</span><span class="cx">                 dn = &quot;uid=cdaboo,cn=users,dc=example,dc=com&quot;
</span><span class="lines">@@ -1638,16 +1678,18 @@
</span><span class="cx">             for scenario in (
</span><span class="cx">                 self.nestedUsingDifferentAttributeUsingGUID,
</span><span class="cx">                 self.nestedUsingSameAttributeUsingGUID,
</span><del>-                ):
</del><ins>+            ):
</ins><span class="cx">                 self.setupService(scenario)
</span><span class="cx"> 
</span><span class="cx">                 self.assertEquals(
</span><del>-                    set([
-                        &quot;left_coast&quot;,
-                        &quot;right_coast&quot;,
-                        &quot;5A985493-EE2C-4665-94CF-4DFEA3A89500&quot;,
-                        &quot;6423F94A-6B76-4A3A-815B-D52CFD77935D&quot;,
-                    ]),
</del><ins>+                    set(
+                        [
+                            &quot;left_coast&quot;,
+                            &quot;right_coast&quot;,
+                            &quot;5A985493-EE2C-4665-94CF-4DFEA3A89500&quot;,
+                            &quot;6423F94A-6B76-4A3A-815B-D52CFD77935D&quot;,
+                        ]
+                    ),
</ins><span class="cx">                     self.service.restrictedPrincipals)
</span><span class="cx"> 
</span><span class="cx">                 dn = &quot;uid=cdaboo,cn=users,dc=example,dc=com&quot;
</span><span class="lines">@@ -1692,8 +1734,10 @@
</span><span class="cx">             # Set up the GroupMembershipCache
</span><span class="cx">             cache = GroupMembershipCache(&quot;ProxyDB&quot;, expireSeconds=60)
</span><span class="cx">             self.service.groupMembershipCache = cache
</span><del>-            updater = GroupMembershipCacheUpdater(calendaruserproxy.ProxyDBService,
-                self.service, 30, 15, 30, cache=cache, useExternalProxies=False)
</del><ins>+            updater = GroupMembershipCacheUpdater(
+                calendaruserproxy.ProxyDBService,
+                self.service, 30, 15, 30, cache=cache, useExternalProxies=False
+            )
</ins><span class="cx"> 
</span><span class="cx">             self.assertEquals((False, 8, 8), (yield updater.updateCache()))
</span><span class="cx"> 
</span><span class="lines">@@ -1726,21 +1770,24 @@
</span><span class="cx">                 ]
</span><span class="cx">             )
</span><span class="cx"> 
</span><del>-
</del><span class="cx">         def test_splitIntoBatches(self):
</span><span class="cx">             self.setupService(self.nestedUsingDifferentAttributeUsingDN)
</span><span class="cx">             # Data is perfect multiple of size
</span><span class="cx">             results = list(splitIntoBatches(set(range(12)), 4))
</span><del>-            self.assertEquals(results,
-                [set([0, 1, 2, 3]), set([4, 5, 6, 7]), set([8, 9, 10, 11])])
</del><ins>+            self.assertEquals(
+                results,
+                [set([0, 1, 2, 3]), set([4, 5, 6, 7]), set([8, 9, 10, 11])]
+            )
</ins><span class="cx"> 
</span><span class="cx">             # Some left overs
</span><span class="cx">             results = list(splitIntoBatches(set(range(12)), 5))
</span><del>-            self.assertEquals(results,
-                [set([0, 1, 2, 3, 4]), set([8, 9, 5, 6, 7]), set([10, 11])])
</del><ins>+            self.assertEquals(
+                results,
+                [set([0, 1, 2, 3, 4]), set([8, 9, 5, 6, 7]), set([10, 11])]
+            )
</ins><span class="cx"> 
</span><span class="cx">             # Empty
</span><del>-            results = list(splitIntoBatches(set([]), 5)) # empty data
</del><ins>+            results = list(splitIntoBatches(set([]), 5))  # empty data
</ins><span class="cx">             self.assertEquals(results, [set([])])
</span><span class="cx"> 
</span><span class="cx">         def test_recordTypeForDN(self):
</span><span class="lines">@@ -1790,7 +1837,8 @@
</span><span class="cx">             self.history = []
</span><span class="cx"> 
</span><span class="cx">             def stubSearchMethod(base, scope, filterstr=&quot;(objectClass=*)&quot;,
</span><del>-                attrlist=None, timeoutSeconds=-1, resultLimit=0):
</del><ins>+                                 attrlist=None, timeoutSeconds=-1,
+                                 resultLimit=0):
</ins><span class="cx">                 self.history.append((base, scope, filterstr))
</span><span class="cx"> 
</span><span class="cx">             recordTypes = [
</span></span></pre>
</div>
</div>

</body>
</html>