1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/templates/event-cancel-person-recurring-instance.txt Thu May 21 20:13:22 2015 +0200
1.3 @@ -0,0 +1,37 @@
1.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
1.5 +MIME-Version: 1.0
1.6 +From: paul.boddie@example.com
1.7 +To: vincent.vole@example.com
1.8 +Subject: Cancellation!
1.9 +
1.10 +Cancel an instance for vincent.vole and paul.boddie.
1.11 +
1.12 +--===============0047278175==
1.13 +Content-Type: text/plain; charset="us-ascii"
1.14 +MIME-Version: 1.0
1.15 +Content-Transfer-Encoding: 7bit
1.16 +
1.17 +This message contains an event.
1.18 +--===============0047278175==
1.19 +MIME-Version: 1.0
1.20 +Content-Transfer-Encoding: 7bit
1.21 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
1.22 +
1.23 +BEGIN:VCALENDAR
1.24 +PRODID:-//imip-agent/test//EN
1.25 +METHOD:CANCEL
1.26 +VERSION:2.0
1.27 +BEGIN:VEVENT
1.28 +ORGANIZER:mailto:paul.boddie@example.com
1.29 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
1.30 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
1.31 +DTSTAMP:20141009T182400Z
1.32 +DTSTART;TZID=Europe/Oslo:20141114T100000
1.33 +DTEND;TZID=Europe/Oslo:20141114T110000
1.34 +SUMMARY:Recurring event
1.35 +UID:event8@example.com
1.36 +RECURRENCE-ID:20141114T090000Z
1.37 +END:VEVENT
1.38 +END:VCALENDAR
1.39 +
1.40 +--===============0047278175==--
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/templates/event-cancel-person-recurring.txt Thu May 21 20:13:22 2015 +0200
2.3 @@ -0,0 +1,36 @@
2.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
2.5 +MIME-Version: 1.0
2.6 +From: paul.boddie@example.com
2.7 +To: vincent.vole@example.com
2.8 +Subject: Cancellation!
2.9 +
2.10 +Cancel the event for vincent.vole and paul.boddie.
2.11 +
2.12 +--===============0047278175==
2.13 +Content-Type: text/plain; charset="us-ascii"
2.14 +MIME-Version: 1.0
2.15 +Content-Transfer-Encoding: 7bit
2.16 +
2.17 +This message contains an event.
2.18 +--===============0047278175==
2.19 +MIME-Version: 1.0
2.20 +Content-Transfer-Encoding: 7bit
2.21 +Content-Type: text/calendar; charset="us-ascii"; method="CANCEL"
2.22 +
2.23 +BEGIN:VCALENDAR
2.24 +PRODID:-//imip-agent/test//EN
2.25 +METHOD:CANCEL
2.26 +VERSION:2.0
2.27 +BEGIN:VEVENT
2.28 +ORGANIZER:mailto:paul.boddie@example.com
2.29 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
2.30 +ATTENDEE;RSVP=TRUE:mailto:paul.boddie@example.com
2.31 +DTSTAMP:20141009T182400Z
2.32 +DTSTART;TZID=Europe/Oslo:20141010T100000
2.33 +DTEND;TZID=Europe/Oslo:20141010T110000
2.34 +SUMMARY:Recurring event
2.35 +UID:event8@example.com
2.36 +END:VEVENT
2.37 +END:VCALENDAR
2.38 +
2.39 +--===============0047278175==--
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/tests/templates/event-request-person-recurring-reschedule-instance.txt Thu May 21 20:13:22 2015 +0200
3.3 @@ -0,0 +1,35 @@
3.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
3.5 +MIME-Version: 1.0
3.6 +From: paul.boddie@example.com
3.7 +To: vincent.vole@example.com
3.8 +Subject: Invitation!
3.9 +
3.10 +--===============0047278175==
3.11 +Content-Type: text/plain; charset="us-ascii"
3.12 +MIME-Version: 1.0
3.13 +Content-Transfer-Encoding: 7bit
3.14 +
3.15 +This message contains an event.
3.16 +--===============0047278175==
3.17 +MIME-Version: 1.0
3.18 +Content-Transfer-Encoding: 7bit
3.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
3.20 +
3.21 +BEGIN:VCALENDAR
3.22 +PRODID:-//imip-agent/test//EN
3.23 +METHOD:REQUEST
3.24 +VERSION:2.0
3.25 +BEGIN:VEVENT
3.26 +ORGANIZER:mailto:paul.boddie@example.com
3.27 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
3.28 +DTSTAMP:20141009T182500Z
3.29 +DTSTART;TZID=Europe/Oslo:20141011T100000
3.30 +DTEND;TZID=Europe/Oslo:20141011T110000
3.31 +SUMMARY:Recurring event
3.32 +UID:event8@example.com
3.33 +RECURRENCE-ID;TZID=Europe/Oslo:20141010T100000
3.34 +SEQUENCE:2
3.35 +END:VEVENT
3.36 +END:VCALENDAR
3.37 +
3.38 +--===============0047278175==--
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/tests/templates/event-request-person-recurring.txt Thu May 21 20:13:22 2015 +0200
4.3 @@ -0,0 +1,34 @@
4.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
4.5 +MIME-Version: 1.0
4.6 +From: paul.boddie@example.com
4.7 +To: vincent.vole@example.com
4.8 +Subject: Invitation!
4.9 +
4.10 +--===============0047278175==
4.11 +Content-Type: text/plain; charset="us-ascii"
4.12 +MIME-Version: 1.0
4.13 +Content-Transfer-Encoding: 7bit
4.14 +
4.15 +This message contains an event.
4.16 +--===============0047278175==
4.17 +MIME-Version: 1.0
4.18 +Content-Transfer-Encoding: 7bit
4.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
4.20 +
4.21 +BEGIN:VCALENDAR
4.22 +PRODID:-//imip-agent/test//EN
4.23 +METHOD:REQUEST
4.24 +VERSION:2.0
4.25 +BEGIN:VEVENT
4.26 +ORGANIZER:mailto:paul.boddie@example.com
4.27 +ATTENDEE;RSVP=TRUE:mailto:vincent.vole@example.com
4.28 +DTSTAMP:20141009T182400Z
4.29 +DTSTART;TZID=Europe/Oslo:20141010T100000
4.30 +DTEND;TZID=Europe/Oslo:20141010T110000
4.31 +RRULE:FREQ=MONTHLY;BYDAY=2FR;COUNT=3
4.32 +SUMMARY:Recurring event
4.33 +UID:event8@example.com
4.34 +END:VEVENT
4.35 +END:VCALENDAR
4.36 +
4.37 +--===============0047278175==--
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/tests/test_person_invitation_recurring.sh Thu May 21 20:13:22 2015 +0200
5.3 @@ -0,0 +1,132 @@
5.4 +#!/bin/sh
5.5 +
5.6 +THIS_DIR=`dirname $0`
5.7 +
5.8 +TEMPLATES="$THIS_DIR/templates"
5.9 +PERSON_SCRIPT="$THIS_DIR/../imip_person.py"
5.10 +SHOWMAIL="$THIS_DIR/../tools/showmail.py"
5.11 +STORE=/tmp/store
5.12 +STATIC=/tmp/static
5.13 +ARGS="-S $STORE -P $STATIC -d"
5.14 +USER="mailto:vincent.vole@example.com"
5.15 +SENDER="mailto:paul.boddie@example.com"
5.16 +FBFILE="$STORE/$USER/freebusy"
5.17 +FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER"
5.18 +TAB=`printf '\t'`
5.19 +
5.20 +OUTGOING_SCRIPT="$THIS_DIR/../imip_person_outgoing.py"
5.21 +
5.22 +PYTHONPATH="$THIS_DIR/.."
5.23 +export PYTHONPATH
5.24 +
5.25 +ACCEPT_SCRIPT="$THIS_DIR/test_handle.py"
5.26 +ACCEPT_ARGS="accept $STORE"
5.27 +
5.28 +DECLINE_SCRIPT="$THIS_DIR/test_handle.py"
5.29 +DECLINE_ARGS="decline $STORE"
5.30 +
5.31 +rm -r $STORE
5.32 +rm -r $STATIC
5.33 +
5.34 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-request-person-all.txt" 2> /dev/null \
5.35 +| "$SHOWMAIL" \
5.36 +> out0.tmp
5.37 +
5.38 + grep -q 'METHOD:REPLY' out0.tmp \
5.39 +&& ! grep -q '^FREEBUSY' out0.tmp \
5.40 +&& echo "Success" \
5.41 +|| echo "Failed"
5.42 +
5.43 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/fb-request-person.txt" 2> /dev/null \
5.44 +| "$SHOWMAIL" \
5.45 +> out1.tmp
5.46 +
5.47 + grep -q 'METHOD:REPLY' out1.tmp \
5.48 +&& ! grep -q '^FREEBUSY' out1.tmp \
5.49 +&& echo "Success" \
5.50 +|| echo "Failed"
5.51 +
5.52 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring.txt" 2> /dev/null \
5.53 +| "$SHOWMAIL" \
5.54 +> out2.tmp
5.55 +
5.56 + ! grep -q 'METHOD:REPLY' out2.tmp \
5.57 +&& echo "Success" \
5.58 +|| echo "Failed"
5.59 +
5.60 + ! grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
5.61 +&& echo "Success" \
5.62 +|| echo "Failed"
5.63 +
5.64 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBOTHERFILE" \
5.65 +&& echo "Success" \
5.66 +|| echo "Failed"
5.67 +
5.68 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "event8@example.com" \
5.69 +| tee out3.tmp \
5.70 +| "$OUTGOING_SCRIPT" $ARGS
5.71 +
5.72 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
5.73 +&& echo "Success" \
5.74 +|| echo "Failed"
5.75 +
5.76 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-person-recurring-instance.txt" 2> /dev/null \
5.77 +| "$SHOWMAIL" \
5.78 +> out4.tmp
5.79 +
5.80 + ! grep -q 'METHOD:REPLY' out4.tmp \
5.81 +&& echo "Success" \
5.82 +|| echo "Failed"
5.83 +
5.84 + [ `grep "event8@example.com" "$FBFILE" | wc -l` = '2' ] \
5.85 +&& ! grep -q "^20141114T090000Z${TAB}20141114T100000Z" "$FBFILE" \
5.86 +&& echo "Success" \
5.87 +|| echo "Failed"
5.88 +
5.89 + [ `grep "event8@example.com" "$FBOTHERFILE" | wc -l` = '2' ] \
5.90 +&& ! grep -q "^20141114T090000Z${TAB}20141114T100000Z" "$FBOTHERFILE" \
5.91 +&& echo "Success" \
5.92 +|| echo "Failed"
5.93 +
5.94 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring-reschedule-instance.txt" 2> /dev/null \
5.95 +| "$SHOWMAIL" \
5.96 +> out5.tmp
5.97 +
5.98 + ! grep -q 'METHOD:REPLY' out5.tmp \
5.99 +&& echo "Success" \
5.100 +|| echo "Failed"
5.101 +
5.102 + ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBFILE" \
5.103 +&& grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBFILE" \
5.104 +&& echo "Success" \
5.105 +|| echo "Failed"
5.106 +
5.107 + grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBOTHERFILE" \
5.108 +&& ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBOTHERFILE" \
5.109 +&& echo "Success" \
5.110 +|| echo "Failed"
5.111 +
5.112 + "$ACCEPT_SCRIPT" $ACCEPT_ARGS "$USER" "event8@example.com" "20141010T080000Z" \
5.113 +| tee out6.tmp \
5.114 +| "$OUTGOING_SCRIPT" $ARGS
5.115 +
5.116 + grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBFILE" \
5.117 +&& ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBFILE" \
5.118 +&& echo "Success" \
5.119 +|| echo "Failed"
5.120 +
5.121 + "$PERSON_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-person-recurring.txt" 2> /dev/null \
5.122 +| "$SHOWMAIL" \
5.123 +> out6.tmp
5.124 +
5.125 + ! grep -q 'METHOD:REPLY' out6.tmp \
5.126 +&& echo "Success" \
5.127 +|| echo "Failed"
5.128 +
5.129 + ! grep -q "event8@example.com" "$FBFILE" \
5.130 +&& echo "Success" \
5.131 +|| echo "Failed"
5.132 +
5.133 + ! grep -q "event8@example.com" "$FBOTHERFILE" \
5.134 +&& echo "Success" \
5.135 +|| echo "Failed"