[CalendarServer-changes] [13365] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 23 20:14:22 PDT 2014
Revision: 13365
http://trac.calendarserver.org//changeset/13365
Author: gaya at apple.com
Date: 2014-04-23 20:14:22 -0700 (Wed, 23 Apr 2014)
Log Message:
-----------
drop sort param in diff_iCalStrs(). normalize_iCalStr() always returns params in standard pycalendar order.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/ical.py
CalendarServer/trunk/txdav/who/test/test_group_attendees.py
Modified: CalendarServer/trunk/twistedcaldav/ical.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/ical.py 2014-04-24 00:24:33 UTC (rev 13364)
+++ CalendarServer/trunk/twistedcaldav/ical.py 2014-04-24 03:14:22 UTC (rev 13365)
@@ -3777,16 +3777,15 @@
pos = line.find(";X-CALENDARSERVER-DTSTAMP=")
if pos != -1:
lines[ctr] = line[:pos] + line[pos + len(";X-CALENDARSERVER-DTSTAMP=") + 16:]
- icalstr = "\r\n".join(lines)
- return icalstr + "\r\n"
+ icalstr = "\r\n".join(lines) + "\r\n"
+ return str(Component.fromString(icalstr))
-def diff_iCalStrs(icalstr1, icalstr2, sort=False):
+
+def diff_iCalStrs(icalstr1, icalstr2):
"""
- @param sort: Whether to sort the output
- @type sort: L{boolean}
"""
- icalstr1 = normalize_iCalStr(icalstr1, sort=sort).splitlines()
- icalstr2 = normalize_iCalStr(icalstr2, sort=sort).splitlines()
+ icalstr1 = normalize_iCalStr(icalstr1).splitlines()
+ icalstr2 = normalize_iCalStr(icalstr2).splitlines()
return "\n".join(unified_diff(icalstr1, icalstr2))
Modified: CalendarServer/trunk/txdav/who/test/test_group_attendees.py
===================================================================
--- CalendarServer/trunk/txdav/who/test/test_group_attendees.py 2014-04-24 00:24:33 UTC (rev 13364)
+++ CalendarServer/trunk/txdav/who/test/test_group_attendees.py 2014-04-24 03:14:22 UTC (rev 13365)
@@ -111,20 +111,8 @@
attendeeProp.setParameter("MEMBER", sorted(parameterValues))
self.assertEqual(
- orderMemberValues(
- Component.fromString(
- normalize_iCalStr(
- iCalStr1
- )
- )
- ),
- orderMemberValues(
- Component.fromString(
- normalize_iCalStr(
- iCalStr2
- )
- )
- )
+ orderMemberValues(Component.fromString(normalize_iCalStr(iCalStr1))),
+ orderMemberValues(Component.fromString(normalize_iCalStr(iCalStr2)))
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140423/2a537e2e/attachment-0001.html>
More information about the calendarserver-changes
mailing list