<!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>[12538] CalDAVTester/trunk</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/12538">12538</a></dd>
<dt>Author</dt> <dd>cdaboo@apple.com</dd>
<dt>Date</dt> <dd>2014-02-03 09:58:12 -0800 (Mon, 03 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Turn on tests for JSON data. Make JSON calendar verifier use the same logic as the regular iCalendar one.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfopodxml">CalDAVTester/trunk/scripts/server/serverinfo-pod.xml</a></li>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfotemplatexml">CalDAVTester/trunk/scripts/server/serverinfo-template.xml</a></li>
<li><a href="#CalDAVTestertrunkscriptsserverserverinfoxml">CalDAVTester/trunk/scripts/server/serverinfo.xml</a></li>
<li><a href="#CalDAVTestertrunkscriptstestsCalDAVjsonxml">CalDAVTester/trunk/scripts/tests/CalDAV/json.xml</a></li>
<li><a href="#CalDAVTestertrunkverifierscalendarDataMatchpy">CalDAVTester/trunk/verifiers/calendarDataMatch.py</a></li>
<li><a href="#CalDAVTestertrunkverifiersjcalDataMatchpy">CalDAVTester/trunk/verifiers/jcalDataMatch.py</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalDAVTestertrunkscriptsserverserverinfopodxml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo-pod.xml (12537 => 12538)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo-pod.xml        2014-02-02 22:26:27 UTC (rev 12537)
+++ CalDAVTester/trunk/scripts/server/serverinfo-pod.xml        2014-02-03 17:58:12 UTC (rev 12538)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">                 <!-- <feature>per-object-ACLs</feature> -->                <!-- ACL for objects in calendar/address books -->
</span><span class="cx">                 <!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
</span><span class="cx">
</span><del>-                <!-- <feature>json-data</feature> -->                        <!-- jCal and jCard support -->
</del><ins>+                <feature>json-data</feature>                                        <!-- jCal and jCard support -->
</ins><span class="cx">
</span><span class="cx">                 <!-- CalDAV specific extension -->
</span><span class="cx">                 <feature>caldav</feature>                                         <!-- Basic CalDAV feature enabler -->
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptsserverserverinfotemplatexml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo-template.xml (12537 => 12538)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo-template.xml        2014-02-02 22:26:27 UTC (rev 12537)
+++ CalDAVTester/trunk/scripts/server/serverinfo-template.xml        2014-02-03 17:58:12 UTC (rev 12538)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">                 <!-- <feature>per-object-ACLs</feature> -->                <!-- ACL for objects in calendar/address books -->
</span><span class="cx">                 <!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
</span><span class="cx">
</span><del>-                <!-- <feature>json-data</feature> -->                        <!-- jCal and jCard support -->
</del><ins>+                <feature>json-data</feature>                                        <!-- jCal and jCard support -->
</ins><span class="cx">
</span><span class="cx">                 <!-- CalDAV specific extension -->
</span><span class="cx">                 <feature>caldav</feature>                                         <!-- Basic CalDAV feature enabler -->
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptsserverserverinfoxml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml (12537 => 12538)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/server/serverinfo.xml        2014-02-02 22:26:27 UTC (rev 12537)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml        2014-02-03 17:58:12 UTC (rev 12538)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">                 <!-- <feature>per-object-ACLs</feature> -->                <!-- ACL for objects in calendar/address books -->
</span><span class="cx">                 <!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
</span><span class="cx">
</span><del>-                <!-- <feature>json-data</feature> -->                        <!-- jCal and jCard support -->
</del><ins>+                <feature>json-data</feature>                                        <!-- jCal and jCard support -->
</ins><span class="cx">
</span><span class="cx">                 <!-- CalDAV specific extension -->
</span><span class="cx">                 <feature>caldav</feature>                                         <!-- Basic CalDAV feature enabler -->
</span></span></pre></div>
<a id="CalDAVTestertrunkscriptstestsCalDAVjsonxml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/tests/CalDAV/json.xml (12537 => 12538)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/tests/CalDAV/json.xml        2014-02-02 22:26:27 UTC (rev 12537)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/json.xml        2014-02-03 17:58:12 UTC (rev 12538)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx">
</span><span class="cx">         <start/>
</span><span class="cx">         
</span><del>-        <test-suite name='PUT iCal/GET json' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='PUT iCal/GET json'>
+                <test name='1'>
</ins><span class="cx">                         <description>PUT iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/1.ics</ruri>
</span><span class="lines">@@ -72,8 +72,8 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='PUT json/GET json/icalendar + Accept/q' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='PUT json/GET json/icalendar + Accept/q'>
+                <test name='1'>
</ins><span class="cx">                         <description>PUT jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar - with accept</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='4' ignore='no'>
</del><ins>+                <test name='4'>
</ins><span class="cx">                         <description>GET iCalendar - no accept</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='5' ignore='no'>
</del><ins>+                <test name='5'>
</ins><span class="cx">                         <description>GET jCal - preferred Accept</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='6' ignore='no'>
</del><ins>+                <test name='6'>
</ins><span class="cx">                         <description>GET jCal - q= preferred Accept</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/1.ics</ruri>
</span><span class="lines">@@ -184,8 +184,8 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='PUT + return-rep' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='PUT + return-rep'>
+                <test name='1'>
</ins><span class="cx">                         <description>PUT jCal/return iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>PUT jCal/return jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>PUT iCalendar/return iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='4' ignore='no'>
</del><ins>+                <test name='4'>
</ins><span class="cx">                         <description>PUT iCalendar/return jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/1.ics</ruri>
</span><span class="lines">@@ -304,8 +304,8 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Multiget json' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='Multiget json'>
+                <test name='1'>
</ins><span class="cx">                         <description>PUT iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>multiget jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>REPORT</method>
</span><span class="lines">@@ -343,14 +343,23 @@
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
</span><del>-                                                <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
</del><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vevent]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*valarm]</value>
</span><span class="cx">                                         </arg>
</span><span class="cx">                                 </verify>
</span><ins>+                                <verify>
+                                        <exclude-feature>
+                                                <feature>timezones-by-reference</feature>
+                                        </exclude-feature>
+                                        <callback>xmlElementMatch</callback>
+                                        <arg>
+                                                <name>exists</name>
+                                                <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
+                                        </arg>
+                                </verify>
</ins><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>multiget with filtered jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>REPORT</method>
</span><span class="lines">@@ -374,14 +383,23 @@
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
</span><del>-                                                <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
</del><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[$vevent]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[$valarm]</value>
</span><span class="cx">                                         </arg>
</span><span class="cx">                                 </verify>
</span><ins>+                                <verify>
+                                        <exclude-feature>
+                                                <feature>timezones-by-reference</feature>
+                                        </exclude-feature>
+                                        <callback>xmlElementMatch</callback>
+                                        <arg>
+                                                <name>exists</name>
+                                                <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
+                                        </arg>
+                                </verify>
</ins><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/1.ics</ruri>
</span><span class="lines">@@ -392,8 +410,8 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Query json' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='Query json'>
+                <test name='1'>
</ins><span class="cx">                         <description>PUT iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -407,7 +425,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>query jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>REPORT</method>
</span><span class="lines">@@ -431,14 +449,23 @@
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
</span><del>-                                                <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
</del><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vevent]</value>
</span><span class="cx">                                                 <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*valarm]</value>
</span><span class="cx">                                         </arg>
</span><span class="cx">                                 </verify>
</span><ins>+                                <verify>
+                                        <exclude-feature>
+                                                <feature>timezones-by-reference</feature>
+                                        </exclude-feature>
+                                        <callback>xmlElementMatch</callback>
+                                        <arg>
+                                                <name>exists</name>
+                                                <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
+                                        </arg>
+                                </verify>
</ins><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>query with expanded jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>REPORT</method>
</span><span class="lines">@@ -470,7 +497,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/1.ics</ruri>
</span><span class="lines">@@ -481,8 +508,8 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Freebusy json' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='Freebusy json'>
+                <test name='1'>
</ins><span class="cx">                         <description>PUT iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PUT</method>
</span><span class="lines">@@ -496,7 +523,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>POST json - get back json</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>POST</method>
</span><span class="lines">@@ -517,7 +544,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/1.ics</ruri>
</span><span class="lines">@@ -528,11 +555,11 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='POST;add-member' ignore='no'>
</del><ins>+        <test-suite name='POST;add-member'>
</ins><span class="cx">                 <require-feature>
</span><span class="cx">                         <feature>add-member</feature>
</span><span class="cx">                 </require-feature>
</span><del>-                <test name='1' ignore='no'>
</del><ins>+                <test name='1'>
</ins><span class="cx">                         <description>POST;add-member jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>POST</method>
</span><span class="lines">@@ -550,7 +577,7 @@
</span><span class="cx">                                 </grabheader>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -568,7 +595,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -586,7 +613,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$posted:</ruri>
</span><span class="lines">@@ -597,11 +624,11 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='POST;add-member - return' ignore='no'>
</del><ins>+        <test-suite name='POST;add-member - return'>
</ins><span class="cx">                 <require-feature>
</span><span class="cx">                         <feature>add-member</feature>
</span><span class="cx">                 </require-feature>
</span><del>-                <test name='1' ignore='no'>
</del><ins>+                <test name='1'>
</ins><span class="cx">                         <description>POST;add-member jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>POST</method>
</span><span class="lines">@@ -631,7 +658,7 @@
</span><span class="cx">                                 </grabheader>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -649,7 +676,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -667,7 +694,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETE</method>
</span><span class="cx">                                 <ruri>$posted:</ruri>
</span><span class="lines">@@ -678,11 +705,11 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Simple BULK json - no return' ignore='no'>
</del><ins>+        <test-suite name='Simple BULK json - no return'>
</ins><span class="cx">                 <require-feature>
</span><span class="cx">                         <feature>bulk-post</feature>
</span><span class="cx">                 </require-feature>
</span><del>-                <test name='1' ignore='no'>
</del><ins>+                <test name='1'>
</ins><span class="cx">                         <description>POST jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>POST</method>
</span><span class="lines">@@ -711,7 +738,7 @@
</span><span class="cx">                                 </grabelement>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -725,7 +752,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -739,7 +766,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETEALL</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/</ruri>
</span><span class="lines">@@ -750,11 +777,11 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Simple BULK json - return' ignore='no'>
</del><ins>+        <test-suite name='Simple BULK json - return'>
</ins><span class="cx">                 <require-feature>
</span><span class="cx">                         <feature>bulk-post</feature>
</span><span class="cx">                 </require-feature>
</span><del>-                <test name='1' ignore='no'>
</del><ins>+                <test name='1'>
</ins><span class="cx">                         <description>POST jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>POST</method>
</span><span class="lines">@@ -787,7 +814,7 @@
</span><span class="cx">                                 </grabelement>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -801,7 +828,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -815,7 +842,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETEALL</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/</ruri>
</span><span class="lines">@@ -826,11 +853,11 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='CRUD json' ignore='no'>
</del><ins>+        <test-suite name='CRUD json'>
</ins><span class="cx">                 <require-feature>
</span><span class="cx">                         <feature>bulk-post</feature>
</span><span class="cx">                 </require-feature>
</span><del>-                <test name='1' ignore='no'>
</del><ins>+                <test name='1'>
</ins><span class="cx">                         <description>POST jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>POST</method>
</span><span class="lines">@@ -859,7 +886,7 @@
</span><span class="cx">                                 </grabelement>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -873,7 +900,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>GET</method>
</span><span class="lines">@@ -887,7 +914,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='-1' ignore='no'>
</del><ins>+                <test name='-1'>
</ins><span class="cx">                         <request>
</span><span class="cx">                                 <method>DELETEALL</method>
</span><span class="cx">                                 <ruri>$calendarpath1:/</ruri>
</span><span class="lines">@@ -898,8 +925,8 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Timezone prop json' ignore='no'>
-                <test name='1' ignore='no'>
</del><ins>+        <test-suite name='Timezone prop json'>
+                <test name='1'>
</ins><span class="cx">                         <description>PROPPATCH jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PROPPATCH</method>
</span><span class="lines">@@ -913,7 +940,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='2' ignore='no'>
</del><ins>+                <test name='2'>
</ins><span class="cx">                         <description>PROPFIND jCal</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PROPFIND</method>
</span><span class="lines">@@ -938,7 +965,7 @@
</span><span class="cx">                                 </verify>
</span><span class="cx">                         </request>
</span><span class="cx">                 </test>
</span><del>-                <test name='3' ignore='no'>
</del><ins>+                <test name='3'>
</ins><span class="cx">                         <description>GET iCalendar - with accept</description>
</span><span class="cx">                         <request>
</span><span class="cx">                                 <method>PROPFIND</method>
</span><span class="lines">@@ -964,7 +991,7 @@
</span><span class="cx">                 </test>
</span><span class="cx">         </test-suite>
</span><span class="cx">
</span><del>-        <test-suite name='Timezone service json' ignore='no'>
</del><ins>+        <test-suite name='Timezone service json'>
</ins><span class="cx">         </test-suite>
</span><span class="cx">
</span><span class="cx">         <end/>
</span></span></pre></div>
<a id="CalDAVTestertrunkverifierscalendarDataMatchpy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/verifiers/calendarDataMatch.py (12537 => 12538)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/verifiers/calendarDataMatch.py        2014-02-02 22:26:27 UTC (rev 12537)
+++ CalDAVTester/trunk/verifiers/calendarDataMatch.py        2014-02-03 17:58:12 UTC (rev 12538)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">
</span><span class="cx"> class Verifier(object):
</span><span class="cx">
</span><del>- def verify(self, manager, uri, response, respdata, args): #@UnusedVariable
</del><ins>+ def verify(self, manager, uri, response, respdata, args, is_json=False): #@UnusedVariable
</ins><span class="cx"> # Get arguments
</span><span class="cx"> files = args.get("filepath", [])
</span><span class="cx"> caldata = args.get("data", [])
</span><span class="lines">@@ -113,13 +113,13 @@
</span><span class="cx"> component.removeProperty(property)
</span><span class="cx">
</span><span class="cx"> try:
</span><del>- resp_calendar = Calendar.parseText(respdata)
</del><ins>+ resp_calendar = Calendar.parseText(respdata) if not is_json else Calendar.parseJSONData(respdata)
</ins><span class="cx"> removePropertiesParameters(resp_calendar)
</span><del>- respdata = resp_calendar.getText()
</del><ins>+ respdata = resp_calendar.getText() if not is_json else resp_calendar.getTextJSON()
</ins><span class="cx">
</span><del>- data_calendar = Calendar.parseText(data)
</del><ins>+ data_calendar = Calendar.parseText(data) if not is_json else Calendar.parseJSONData(data)
</ins><span class="cx"> removePropertiesParameters(data_calendar)
</span><del>- data = data_calendar.getText()
</del><ins>+ data = data_calendar.getText() if not is_json else data_calendar.getTextJSON()
</ins><span class="cx">
</span><span class="cx"> result = respdata == data
</span><span class="cx">
</span></span></pre></div>
<a id="CalDAVTestertrunkverifiersjcalDataMatchpy"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/verifiers/jcalDataMatch.py (12537 => 12538)</h4>
<pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/verifiers/jcalDataMatch.py        2014-02-02 22:26:27 UTC (rev 12537)
+++ CalDAVTester/trunk/verifiers/jcalDataMatch.py        2014-02-03 17:58:12 UTC (rev 12538)
</span><span class="lines">@@ -14,8 +14,7 @@
</span><span class="cx"> # limitations under the License.
</span><span class="cx"> ##
</span><span class="cx">
</span><del>-from difflib import unified_diff
-import json
</del><ins>+from verifiers.calendarDataMatch import Verifier as CalVerifier
</ins><span class="cx">
</span><span class="cx"> """
</span><span class="cx"> Verifier that checks the response body for a semantic match to data in a file.
</span><span class="lines">@@ -23,108 +22,9 @@
</span><span class="cx">
</span><span class="cx"> class Verifier(object):
</span><span class="cx">
</span><del>- def verify(self, manager, uri, response, respdata, args): #@UnusedVariable
- # Get arguments
- files = args.get("filepath", [])
- caldata = args.get("data", [])
- filters = args.get("filter", [])
</del><ins>+ def verify(self, manager, uri, response, respdata, args):
</ins><span class="cx">
</span><del>- if "EMAIL parameter" not in manager.server_info.features:
- filters.append("ATTENDEE:EMAIL")
- filters.append("ORGANIZER:EMAIL")
- filters.append("ATTENDEE:X-CALENDARSERVER-DTSTAMP")
- filters.append("CALSCALE")
- filters.append("PRODID")
- filters.append("DTSTAMP")
- filters.append("CREATED")
- filters.append("LAST-MODIFIED")
- filters.append("X-WR-CALNAME")
-
- for afilter in tuple(filters):
- if afilter[0] == "!" and afilter[1:] in filters:
- filters.remove(afilter[1:])
- filters = filter(lambda x: x[0] != "!", filters)
-
- # status code must be 200, 201, 207
- if response.status not in (200, 201, 207):
- return False, " HTTP Status Code Wrong: %d" % (response.status,)
-
- # look for response data
- if not respdata:
- return False, " No response body"
-
- # look for content-type
- hdrs = response.msg.getheaders("Content-Type")
- if hdrs is None or len(hdrs) == 0:
- return False, " No Content-Type header"
- if len(hdrs) != 1:
- return False, " Wrong number of Content-Type headers"
- if hdrs[0].split(";")[0] != "application/calendar+json":
- return False, " Wrong Content-Type header"
-
- # look for one file
- if len(files) != 1 and len(caldata) != 1:
- return False, " No file to compare response to"
-
- # read in all data from specified file or use provided data
- if len(files):
- fd = open(files[0], "r")
- try:
- try:
- data = fd.read()
- finally:
- fd.close()
- except:
- data = None
- else:
- data = caldata[0] if len(caldata) else None
-
- if data is None:
- return False, " Could not read data file"
-
- data = manager.server_info.extrasubs(manager.server_info.subs(data))
-
- def removePropertiesParameters(component):
-
- # component = [name, props-array, subcomponent-array]
-
- for subcomponent in component[2]:
- removePropertiesParameters(subcomponent)
-
- for pos, property in reversed(tuple(enumerate(component[1]))):
-
- # property = [name, param-dict, value-type, values...]
-
- # Always reset DTSTAMP on these properties
- if property[0] in ("ATTENDEE".lower(), "X-CALENDARSERVER-ATTENDEE-COMMENT".lower()):
- if "X-CALENDARSERVER-DTSTAMP".lower() in property[1]:
- property[1]["X-CALENDARSERVER-DTSTAMP".lower()] = "20080101T000000Z"
-
- for filter in filters:
- if ":" in filter:
- propname, parameter = filter.split(":")
- if property[0] == propname.lower():
- if parameter.lower in property[1]:
- del property[1][parameter.lower()]
- else:
- if property[0] == filter.lower():
- del component[1][pos]
-
- try:
- resp_calendar = json.loads(respdata)
- removePropertiesParameters(resp_calendar)
- respdata = json.dumps(resp_calendar)
-
- data_calendar = json.loads(data)
- removePropertiesParameters(data_calendar)
- data = json.dumps(data_calendar)
-
- result = respdata == data
-
- if result:
- return True, ""
- else:
- error_diff = "\n".join([line for line in unified_diff(data.split("\n"), respdata.split("\n"))])
- return False, " Response data does not exactly match file data%s" % (error_diff,)
- except Exception, e:
- return False, " Response data is not calendar data: %s" % (e,)
</del><ins>+ # Just hand this off to the calendarDataMatch verifier which knows all about
+ # proper calendar normalization rules.
+ verifier = CalVerifier()
+ return verifier.verify(manager, uri, response, respdata, args, is_json=True)
</ins></span></pre>
</div>
</div>
</body>
</html>