[CalendarServer-changes] [10740] CalendarServer/trunk/twext/who/test/test_xml.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 15 13:10:44 PST 2013
Revision: 10740
http://trac.calendarserver.org//changeset/10740
Author: wsanchez at apple.com
Date: 2013-02-15 13:10:44 -0800 (Fri, 15 Feb 2013)
Log Message:
-----------
Add test_queryStartsWithNotAny
Modified Paths:
--------------
CalendarServer/trunk/twext/who/test/test_xml.py
Modified: CalendarServer/trunk/twext/who/test/test_xml.py
===================================================================
--- CalendarServer/trunk/twext/who/test/test_xml.py 2013-02-15 20:43:58 UTC (rev 10739)
+++ CalendarServer/trunk/twext/who/test/test_xml.py 2013-02-15 21:10:44 UTC (rev 10740)
@@ -442,6 +442,40 @@
service = self._testService()
records = yield service.recordsFromQuery((
service.query(
+ "shortNames", "w",
+ matchType = MatchType.startsWith,
+ flags = QueryFlags.NOT,
+ ),
+ ))
+ self.assertRecords(
+ records,
+ (
+ '__alyssa__',
+ '__calendar-dev__',
+ '__cdaboo__',
+ '__developers__',
+ '__dre__',
+ '__dreid__',
+ '__exarkun__',
+ '__glyph__',
+ '__joe__',
+ '__sagen__',
+ '__twisted__',
+ ),
+ )
+
+
+ @inlineCallbacks
+ def test_queryStartsWithNotAny(self):
+ """
+ FIXME?: In the this case, the record __wsanchez__ has two
+ shortNames, and one doesn't match the query. Should it be
+ included or not? It is, because one matches the query, but
+ should NOT require that all match?
+ """
+ service = self._testService()
+ records = yield service.recordsFromQuery((
+ service.query(
"shortNames", "wil",
matchType = MatchType.startsWith,
flags = QueryFlags.NOT,
@@ -461,11 +495,11 @@
'__joe__',
'__sagen__',
'__twisted__',
- ))
+ '__wsanchez__',
+ ),
+ )
- test_queryStartsWithNot.todo = "Not implemented."
-
@inlineCallbacks
def test_queryStartsWithNotNoIndex(self):
service = self._testService()
@@ -560,7 +594,7 @@
@inlineCallbacks
- def test_queryContainsNoIndexNot(self):
+ def test_queryContainsNotNoIndex(self):
service = self._testService()
records = yield service.recordsFromQuery((
service.query(
@@ -586,7 +620,7 @@
),
)
- test_queryContainsNoIndexNot.todo = "Not implemented."
+ test_queryContainsNotNoIndex.todo = "Not implemented."
@inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130215/ec29e2a5/attachment.html>
More information about the calendarserver-changes
mailing list