<!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>[11878] CalendarServer/trunk/twext/who/test</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/11878">11878</a></dd>
<dt>Author</dt> <dd>wsanchez@apple.com</dd>
<dt>Date</dt> <dd>2013-11-01 17:09:02 -0700 (Fri, 01 Nov 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>cosmetic</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServertrunktwextwhotesttest_aggregatepy">CalendarServer/trunk/twext/who/test/test_aggregate.py</a></li>
<li><a href="#CalendarServertrunktwextwhotesttest_utilpy">CalendarServer/trunk/twext/who/test/test_util.py</a></li>
<li><a href="#CalendarServertrunktwextwhotesttest_xmlpy">CalendarServer/trunk/twext/who/test/test_xml.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServertrunktwextwhotesttest_aggregatepy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/who/test/test_aggregate.py (11877 => 11878)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/who/test/test_aggregate.py        2013-11-01 23:55:30 UTC (rev 11877)
+++ CalendarServer/trunk/twext/who/test/test_aggregate.py        2013-11-02 00:09:02 UTC (rev 11878)
</span><span class="lines">@@ -69,7 +69,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class DirectoryServiceImmutableTest(BaseTest, test_directory.BaseDirectoryServiceImmutableTest):
</del><ins>+class DirectoryServiceImmutableTest(
+ BaseTest,
+ test_directory.BaseDirectoryServiceImmutableTest,
+):
</ins><span class="cx"> pass
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -82,24 +85,39 @@
</span><span class="cx"> class GroupsDirectoryService(XMLTestService):
</span><span class="cx"> recordType = ConstantsContainer((XMLTestService.recordType.group,))
</span><span class="cx">
</span><del>- usersService = self.xmlService(testXMLConfigUsers, UsersDirectoryService)
- groupsService = self.xmlService(testXMLConfigGroups, GroupsDirectoryService)
</del><ins>+ usersService = self.xmlService(
+ testXMLConfigUsers,
+ UsersDirectoryService
+ )
+ groupsService = self.xmlService(
+ testXMLConfigGroups,
+ GroupsDirectoryService
+ )
</ins><span class="cx">
</span><span class="cx"> return BaseTest.service(self, (usersService, groupsService))
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class DirectoryServiceAggregatedBaseTest(AggregatedBaseTest, DirectoryServiceBaseTest):
</del><ins>+class DirectoryServiceAggregatedBaseTest(
+ AggregatedBaseTest,
+ DirectoryServiceBaseTest,
+):
</ins><span class="cx"> pass
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class DirectoryServiceAggregatedQueryTest(AggregatedBaseTest, test_xml.DirectoryServiceQueryTest):
</del><ins>+class DirectoryServiceAggregatedQueryTest(
+ AggregatedBaseTest,
+ test_xml.DirectoryServiceQueryTest,
+):
</ins><span class="cx"> pass
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class DirectoryServiceAggregatedImmutableTest(AggregatedBaseTest, test_directory.BaseDirectoryServiceImmutableTest):
</del><ins>+class DirectoryServiceAggregatedImmutableTest(
+ AggregatedBaseTest,
+ test_directory.BaseDirectoryServiceImmutableTest,
+):
</ins><span class="cx"> pass
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="CalendarServertrunktwextwhotesttest_utilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/who/test/test_util.py (11877 => 11878)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/who/test/test_util.py        2013-11-01 23:55:30 UTC (rev 11877)
+++ CalendarServer/trunk/twext/who/test/test_util.py        2013-11-02 00:09:02 UTC (rev 11878)
</span><span class="lines">@@ -82,7 +82,11 @@
</span><span class="cx"> )
</span><span class="cx">
</span><span class="cx"> def test_lookupByName(self):
</span><del>- constants = set((Instruments.hammer, Tools.screwdriver, Instruments.chisel))
</del><ins>+ constants = set((
+ Instruments.hammer,
+ Tools.screwdriver,
+ Instruments.chisel,
+ ))
</ins><span class="cx"> container = ConstantsContainer(constants)
</span><span class="cx">
</span><span class="cx"> self.assertEquals(
</span><span class="lines">@@ -108,7 +112,7 @@
</span><span class="cx"> class UtilTest(unittest.TestCase):
</span><span class="cx"> def test_uniqueResult(self):
</span><span class="cx"> self.assertEquals(1, uniqueResult((1,)))
</span><del>- self.assertRaises(DirectoryServiceError, uniqueResult, (1,2,3))
</del><ins>+ self.assertRaises(DirectoryServiceError, uniqueResult, (1, 2, 3))
</ins><span class="cx">
</span><span class="cx"> def test_describe(self):
</span><span class="cx"> self.assertEquals("nail pounder", describe(Tools.hammer))
</span><span class="lines">@@ -116,5 +120,5 @@
</span><span class="cx">
</span><span class="cx"> def test_describeFlags(self):
</span><span class="cx"> self.assertEquals("blue", describe(Switches.b))
</span><del>- self.assertEquals("red|green", describe(Switches.r|Switches.g))
- self.assertEquals("blue|black", describe(Switches.b|Switches.black))
</del><ins>+ self.assertEquals("red|green", describe(Switches.r | Switches.g))
+ self.assertEquals("blue|black", describe(Switches.b | Switches.black))
</ins></span></pre></div>
<a id="CalendarServertrunktwextwhotesttest_xmlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/trunk/twext/who/test/test_xml.py (11877 => 11878)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/trunk/twext/who/test/test_xml.py        2013-11-01 23:55:30 UTC (rev 11877)
+++ CalendarServer/trunk/twext/who/test/test_xml.py        2013-11-02 00:09:02 UTC (rev 11878)
</span><span class="lines">@@ -47,7 +47,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">
</span><del>-class DirectoryServiceBaseTest(BaseTest, test_directory.BaseDirectoryServiceTest):
</del><ins>+class DirectoryServiceBaseTest(
+ BaseTest,
+ test_directory.BaseDirectoryServiceTest,
+):
</ins><span class="cx"> def test_repr(self):
</span><span class="cx"> service = self.service()
</span><span class="cx">
</span><span class="lines">@@ -70,7 +73,11 @@
</span><span class="cx"> @inlineCallbacks
</span><span class="cx"> def test_recordWithGUID(self):
</span><span class="cx"> service = self.service()
</span><del>- record = (yield service.recordWithGUID("6C495FCD-7E78-4D5C-AA66-BC890AD04C9D"))
</del><ins>+ record = (
+ yield service.recordWithGUID(
+ "6C495FCD-7E78-4D5C-AA66-BC890AD04C9D"
+ )
+ )
</ins><span class="cx"> self.assertEquals(record, None)
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -80,8 +87,11 @@
</span><span class="cx"> records = (yield service.recordsWithRecordType(object()))
</span><span class="cx"> self.assertEquals(set(records), set())
</span><span class="cx">
</span><del>- records = (yield service.recordsWithRecordType(service.recordType.user))
- self.assertRecords(records,
</del><ins>+ records = (
+ yield service.recordsWithRecordType(service.recordType.user)
+ )
+ self.assertRecords(
+ records,
</ins><span class="cx"> (
</span><span class="cx"> "__wsanchez__",
</span><span class="cx"> "__glyph__",
</span><span class="lines">@@ -95,8 +105,11 @@
</span><span class="cx"> ),
</span><span class="cx"> )
</span><span class="cx">
</span><del>- records = (yield service.recordsWithRecordType(service.recordType.group))
- self.assertRecords(records,
</del><ins>+ records = (
+ yield service.recordsWithRecordType(service.recordType.group)
+ )
+ self.assertRecords(
+ records,
</ins><span class="cx"> (
</span><span class="cx"> "__calendar-dev__",
</span><span class="cx"> "__twisted__",
</span><span class="lines">@@ -109,13 +122,28 @@
</span><span class="cx"> def test_recordWithShortName(self):
</span><span class="cx"> service = self.service()
</span><span class="cx">
</span><del>- record = (yield service.recordWithShortName(service.recordType.user, "null"))
</del><ins>+ record = (
+ yield service.recordWithShortName(
+ service.recordType.user,
+ "null",
+ )
+ )
</ins><span class="cx"> self.assertEquals(record, None)
</span><span class="cx">
</span><del>- record = (yield service.recordWithShortName(service.recordType.user, "wsanchez"))
</del><ins>+ record = (
+ yield service.recordWithShortName(
+ service.recordType.user,
+ "wsanchez",
+ )
+ )
</ins><span class="cx"> self.assertEquals(record.uid, "__wsanchez__")
</span><span class="cx">
</span><del>- record = (yield service.recordWithShortName(service.recordType.user, "wilfredo_sanchez"))
</del><ins>+ record = (
+ yield service.recordWithShortName(
+ service.recordType.user,
+ "wilfredo_sanchez",
+ )
+ )
</ins><span class="cx"> self.assertEquals(record.uid, "__wsanchez__")
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -123,13 +151,25 @@
</span><span class="cx"> def test_recordsWithEmailAddress(self):
</span><span class="cx"> service = self.service()
</span><span class="cx">
</span><del>- records = (yield service.recordsWithEmailAddress("wsanchez@bitbucket.calendarserver.org"))
</del><ins>+ records = (
+ yield service.recordsWithEmailAddress(
+ "wsanchez@bitbucket.calendarserver.org"
+ )
+ )
</ins><span class="cx"> self.assertRecords(records, ("__wsanchez__",))
</span><span class="cx">
</span><del>- records = (yield service.recordsWithEmailAddress("wsanchez@devnull.twistedmatrix.com"))
</del><ins>+ records = (
+ yield service.recordsWithEmailAddress(
+ "wsanchez@devnull.twistedmatrix.com"
+ )
+ )
</ins><span class="cx"> self.assertRecords(records, ("__wsanchez__",))
</span><span class="cx">
</span><del>- records = (yield service.recordsWithEmailAddress("shared@example.com"))
</del><ins>+ records = (
+ yield service.recordsWithEmailAddress(
+ "shared@example.com"
+ )
+ )
</ins><span class="cx"> self.assertRecords(records, ("__sagen__", "__dre__"))
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -176,12 +216,12 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> def test_badRootElement(self):
</span><del>- service = self.service(xmlData=
</del><ins>+ service = self.service(xmlData=(
</ins><span class="cx"> """<?xml version="1.0" encoding="utf-8"?>
</span><span class="cx">
</span><span class="cx"> <frobnitz />
</span><span class="cx"> """
</span><del>- )
</del><ins>+ ))
</ins><span class="cx">
</span><span class="cx"> self.assertRaises(ParseError, service.loadRecords)
</span><span class="cx"> try:
</span><span class="lines">@@ -193,12 +233,12 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> def test_noRealmName(self):
</span><del>- service = self.service(xmlData=
</del><ins>+ service = self.service(xmlData=(
</ins><span class="cx"> """<?xml version="1.0" encoding="utf-8"?>
</span><span class="cx">
</span><span class="cx"> <directory />
</span><span class="cx"> """
</span><del>- )
</del><ins>+ ))
</ins><span class="cx">
</span><span class="cx"> self.assertRaises(ParseError, service.loadRecords)
</span><span class="cx"> try:
</span><span class="lines">@@ -215,7 +255,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> def test_unknownFieldElementsDirty(self):
</span><del>- service = self.service(xmlData=
</del><ins>+ service = self.service(xmlData=(
</ins><span class="cx"> """<?xml version="1.0" encoding="utf-8"?>
</span><span class="cx">
</span><span class="cx"> <directory realm="Unknown Record Types">
</span><span class="lines">@@ -226,8 +266,11 @@
</span><span class="cx"> </record>
</span><span class="cx"> </directory>
</span><span class="cx"> """
</span><ins>+ ))
+ self.assertEquals(
+ set(service.unknownFieldElements),
+ set(("political-affiliation",))
</ins><span class="cx"> )
</span><del>- self.assertEquals(set(service.unknownFieldElements), set(("political-affiliation",)))
</del><span class="cx">
</span><span class="cx">
</span><span class="cx"> def test_unknownRecordTypesClean(self):
</span><span class="lines">@@ -236,7 +279,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> def test_unknownRecordTypesDirty(self):
</span><del>- service = self.service(xmlData=
</del><ins>+ service = self.service(xmlData=(
</ins><span class="cx"> """<?xml version="1.0" encoding="utf-8"?>
</span><span class="cx">
</span><span class="cx"> <directory realm="Unknown Record Types">
</span><span class="lines">@@ -247,7 +290,7 @@
</span><span class="cx"> </record>
</span><span class="cx"> </directory>
</span><span class="cx"> """
</span><del>- )
</del><ins>+ ))
</ins><span class="cx"> self.assertEquals(set(service.unknownRecordTypes), set(("camera",)))
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -314,7 +357,10 @@
</span><span class="cx"> records = yield service.recordsFromQuery(
</span><span class="cx"> (
</span><span class="cx"> service.query("emailAddresses", "shared@example.com"),
</span><del>- service.query("fullNames", "Andre LaBranche", flags=MatchFlags.NOT),
</del><ins>+ service.query(
+ "fullNames", "Andre LaBranche",
+ flags=MatchFlags.NOT
+ ),
</ins><span class="cx"> ),
</span><span class="cx"> operand=Operand.AND
</span><span class="cx"> )
</span><span class="lines">@@ -325,7 +371,10 @@
</span><span class="cx"> def test_queryCaseInsensitive(self):
</span><span class="cx"> service = self.service()
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><del>- service.query("shortNames", "SagEn", flags=MatchFlags.caseInsensitive),
</del><ins>+ service.query(
+ "shortNames", "SagEn",
+ flags=MatchFlags.caseInsensitive
+ ),
</ins><span class="cx"> ))
</span><span class="cx"> self.assertRecords(records, ("__sagen__",))
</span><span class="cx">
</span><span class="lines">@@ -334,7 +383,10 @@
</span><span class="cx"> def test_queryCaseInsensitiveNoIndex(self):
</span><span class="cx"> service = self.service()
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><del>- service.query("fullNames", "moRGen SAGen", flags=MatchFlags.caseInsensitive),
</del><ins>+ service.query(
+ "fullNames", "moRGen SAGen",
+ flags=MatchFlags.caseInsensitive
+ ),
</ins><span class="cx"> ))
</span><span class="cx"> self.assertRecords(records, ("__sagen__",))
</span><span class="cx">
</span><span class="lines">@@ -352,7 +404,10 @@
</span><span class="cx"> def test_queryStartsWithNoIndex(self):
</span><span class="cx"> service = self.service()
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><del>- service.query("fullNames", "Wilfredo", matchType=MatchType.startsWith),
</del><ins>+ service.query(
+ "fullNames", "Wilfredo",
+ matchType=MatchType.startsWith
+ ),
</ins><span class="cx"> ))
</span><span class="cx"> self.assertRecords(records, ("__wsanchez__",))
</span><span class="cx">
</span><span class="lines">@@ -363,8 +418,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "shortNames", "w",
</span><del>- matchType = MatchType.startsWith,
- flags = MatchFlags.NOT,
</del><ins>+ matchType=MatchType.startsWith,
+ flags=MatchFlags.NOT,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(
</span><span class="lines">@@ -397,8 +452,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "shortNames", "wil",
</span><del>- matchType = MatchType.startsWith,
- flags = MatchFlags.NOT,
</del><ins>+ matchType=MatchType.startsWith,
+ flags=MatchFlags.NOT,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(
</span><span class="lines">@@ -426,8 +481,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "fullNames", "Wilfredo",
</span><del>- matchType = MatchType.startsWith,
- flags = MatchFlags.NOT,
</del><ins>+ matchType=MatchType.startsWith,
+ flags=MatchFlags.NOT,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(
</span><span class="lines">@@ -454,8 +509,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "shortNames", "WIL",
</span><del>- matchType = MatchType.startsWith,
- flags = MatchFlags.caseInsensitive,
</del><ins>+ matchType=MatchType.startsWith,
+ flags=MatchFlags.caseInsensitive,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(records, ("__wsanchez__",))
</span><span class="lines">@@ -467,8 +522,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "fullNames", "wilfrEdo",
</span><del>- matchType = MatchType.startsWith,
- flags = MatchFlags.caseInsensitive,
</del><ins>+ matchType=MatchType.startsWith,
+ flags=MatchFlags.caseInsensitive,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(records, ("__wsanchez__",))
</span><span class="lines">@@ -478,7 +533,10 @@
</span><span class="cx"> def test_queryContains(self):
</span><span class="cx"> service = self.service()
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><del>- service.query("shortNames", "sanchez", matchType=MatchType.contains),
</del><ins>+ service.query(
+ "shortNames", "sanchez",
+ matchType=MatchType.contains
+ ),
</ins><span class="cx"> ))
</span><span class="cx"> self.assertRecords(records, ("__wsanchez__",))
</span><span class="cx">
</span><span class="lines">@@ -498,8 +556,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "shortNames", "sanchez",
</span><del>- matchType = MatchType.contains,
- flags = MatchFlags.NOT,
</del><ins>+ matchType=MatchType.contains,
+ flags=MatchFlags.NOT,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(
</span><span class="lines">@@ -526,8 +584,8 @@
</span><span class="cx"> records = yield service.recordsFromQuery((
</span><span class="cx"> service.query(
</span><span class="cx"> "fullNames", "fred",
</span><del>- matchType = MatchType.contains,
- flags = MatchFlags.NOT,
</del><ins>+ matchType=MatchType.contains,
+ flags=MatchFlags.NOT,
</ins><span class="cx"> ),
</span><span class="cx"> ))
</span><span class="cx"> self.assertRecords(
</span><span class="lines">@@ -590,12 +648,18 @@
</span><span class="cx">
</span><span class="cx"> # Verify change is present immediately
</span><span class="cx"> record = (yield service.recordWithUID("__wsanchez__"))
</span><del>- self.assertEquals(set(record.fullNames), set(("Wilfredo Sanchez Vega",)))
</del><ins>+ self.assertEquals(
+ set(record.fullNames),
+ set(("Wilfredo Sanchez Vega",))
+ )
</ins><span class="cx">
</span><span class="cx"> # Verify change is persisted
</span><span class="cx"> service.flush()
</span><span class="cx"> record = (yield service.recordWithUID("__wsanchez__"))
</span><del>- self.assertEquals(set(record.fullNames), set(("Wilfredo Sanchez Vega",)))
</del><ins>+ self.assertEquals(
+ set(record.fullNames),
+ set(("Wilfredo Sanchez Vega",))
+ )
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -604,7 +668,7 @@
</span><span class="cx">
</span><span class="cx"> newRecord = DirectoryRecord(
</span><span class="cx"> service,
</span><del>- fields = {
</del><ins>+ fields={
</ins><span class="cx"> service.fieldName.uid: "__plugh__",
</span><span class="cx"> service.fieldName.recordType: service.recordType.user,
</span><span class="cx"> service.fieldName.shortNames: ("plugh",),
</span><span class="lines">@@ -628,14 +692,17 @@
</span><span class="cx">
</span><span class="cx"> newRecord = DirectoryRecord(
</span><span class="cx"> service,
</span><del>- fields = {
</del><ins>+ fields={
</ins><span class="cx"> service.fieldName.uid: "__plugh__",
</span><span class="cx"> service.fieldName.recordType: service.recordType.user,
</span><span class="cx"> service.fieldName.shortNames: ("plugh",),
</span><span class="cx"> }
</span><span class="cx"> )
</span><span class="cx">
</span><del>- self.assertFailure(service.updateRecords((newRecord,)), NoSuchRecordError)
</del><ins>+ self.assertFailure(
+ service.updateRecords((newRecord,)),
+ NoSuchRecordError
+ )
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> @inlineCallbacks
</span><span class="lines">@@ -714,8 +781,8 @@
</span><span class="cx"> assert name is not None
</span><span class="cx"> return MatchExpression(
</span><span class="cx"> name, value,
</span><del>- matchType = matchType,
- flags = flags,
</del><ins>+ matchType=matchType,
+ flags=flags,
</ins><span class="cx"> )
</span><span class="cx">
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>