[CalendarServer-changes] [988] CalDAVTester/trunk/verifiers/dataMatch.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 8 18:26:51 PST 2007


Revision: 988
          http://trac.macosforge.org/projects/calendarserver/changeset/988
Author:   cdaboo at apple.com
Date:     2007-01-08 18:26:50 -0800 (Mon, 08 Jan 2007)

Log Message:
-----------
When comparing iCalendar data we need to eliminate the effect of line wrapping.

Modified Paths:
--------------
    CalDAVTester/trunk/verifiers/dataMatch.py

Modified: CalDAVTester/trunk/verifiers/dataMatch.py
===================================================================
--- CalDAVTester/trunk/verifiers/dataMatch.py	2007-01-09 01:34:54 UTC (rev 987)
+++ CalDAVTester/trunk/verifiers/dataMatch.py	2007-01-09 02:26:50 UTC (rev 988)
@@ -53,10 +53,20 @@
 
         data = manager.server_info.subs(data)
 
+        result = True
         if data != respdata:
             data = data.replace("\n", "\r\n")
             if data != respdata:
-                return False, "        Response data does not exactly match file data"
-
-        return True, ""
-            
+                # If we have an iCalendar file, then unwrap data and do compare
+                if files[0].endswith(".ics"):
+                    data = data.replace("\r\n ", "")
+                    respdata = respdata.replace("\r\n ", "")
+                    if data != respdata:
+                        result = False
+                else:
+                    result = False
+                
+        if result:
+            return True, ""
+        else:
+            return False, "        Response data does not exactly match file data"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070108/d7ad1a37/attachment.html


More information about the calendarserver-changes mailing list