[CalendarServer-changes] [13027] CalendarServer/branches/users/sagen/move2who-4/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 28 12:31:41 PDT 2014
Revision: 13027
http://trac.calendarserver.org//changeset/13027
Author: sagen at apple.com
Date: 2014-03-28 12:31:41 -0700 (Fri, 28 Mar 2014)
Log Message:
-----------
recordsFromExpression does not work across AMP until we can serialize expressions
Modified Paths:
--------------
CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py
CalendarServer/branches/users/sagen/move2who-4/txdav/dps/test/test_client.py
CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_directory.py
Modified: CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py 2014-03-28 19:08:49 UTC (rev 13026)
+++ CalendarServer/branches/users/sagen/move2who-4/txdav/dps/client.py 2014-03-28 19:31:41 UTC (rev 13027)
@@ -271,6 +271,8 @@
)
+ def recordsFromExpression(self, expression):
+ raise NotImplementedError("This won't work until expressions are serializable to send across AMP")
Modified: CalendarServer/branches/users/sagen/move2who-4/txdav/dps/test/test_client.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/txdav/dps/test/test_client.py 2014-03-28 19:08:49 UTC (rev 13026)
+++ CalendarServer/branches/users/sagen/move2who-4/txdav/dps/test/test_client.py 2014-03-28 19:31:41 UTC (rev 13027)
@@ -17,7 +17,7 @@
import os
from twext.who.expression import (
- Operand, MatchType, MatchFlags, MatchExpression, CompoundExpression
+ Operand, MatchType, MatchFlags, MatchExpression
)
from twext.who.idirectory import RecordType, FieldName
from twisted.cred.credentials import calcResponse, calcHA1, calcHA2
@@ -64,6 +64,11 @@
class DPSClientSingleDirectoryTest(unittest.TestCase):
+ """
+ Tests the client against a single directory service (as opposed to the
+ augmented, aggregated structure you get from directoryFromConfig(), which
+ is tested in the class below)
+ """
def setUp(self):
@@ -218,7 +223,9 @@
records = yield self.directory.recordsFromExpression(expression)
self.assertEquals(len(records), 1)
+ test_recordsFromMatchExpression.todo = "Won't work until we can serialize expressions"
+
@inlineCallbacks
def test_verifyPlaintextPassword(self):
expectations = (
@@ -279,6 +286,10 @@
class DPSClientAugmentedAggregateDirectoryTest(StoreTestCase):
+ """
+ Similar to the above tests, but in the context of the directory structure
+ that directoryFromConfig() returns
+ """
wsanchezUID = u"6423F94A-6B76-4A3A-815B-D52CFD77935D"
@@ -438,7 +449,9 @@
records = yield self.client.recordsFromExpression(expression)
self.assertEquals(len(records), 1)
+ test_recordsFromMatchExpression.todo = "Won't work until we can serialize expressions"
+
@inlineCallbacks
def test_verifyPlaintextPassword(self):
expectations = (
Modified: CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_directory.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_directory.py 2014-03-28 19:08:49 UTC (rev 13026)
+++ CalendarServer/branches/users/sagen/move2who-4/txdav/who/test/test_directory.py 2014-03-28 19:31:41 UTC (rev 13027)
@@ -24,6 +24,9 @@
from twext.who.idirectory import FieldName, RecordType
from txdav.who.directory import CalendarDirectoryRecordMixin
from uuid import UUID
+from twext.who.expression import (
+ MatchType, MatchFlags, MatchExpression
+)
@@ -96,3 +99,15 @@
record.canonicalCalendarUserAddress(),
u"urn:uuid:E2F6C57F-BB15-4EF9-B0AC-47A7578386F1"
)
+
+
+ @inlineCallbacks
+ def test_recordsFromMatchExpression(self):
+ expression = MatchExpression(
+ FieldName.uid,
+ u"6423F94A-6B76-4A3A-815B-D52CFD77935D",
+ MatchType.equals,
+ MatchFlags.none
+ )
+ records = yield self.directory.recordsFromExpression(expression)
+ self.assertEquals(len(records), 1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140328/f259c115/attachment.html>
More information about the calendarserver-changes
mailing list