1.1 --- a/tests/test_handle.py Tue Apr 19 00:53:59 2016 +0200
1.2 +++ b/tests/test_handle.py Tue Apr 19 17:57:28 2016 +0200
1.3 @@ -54,6 +54,7 @@
1.4
1.5 if have_new_recurrence:
1.6 self.obj["RECURRENCE-ID"] = [(recurrenceid, {})]
1.7 + self.obj.remove_all(["RDATE", "RRULE"])
1.8
1.9 # Reply only on behalf of this user.
1.10
1.11 @@ -61,10 +62,19 @@
1.12 attendee_attr = self.update_participation(action == "accept" and "ACCEPTED" or "DECLINED")
1.13 method = "REPLY"
1.14
1.15 - # For counter-proposals, set a new main period for the event.
1.16 -
1.17 elif action == "counter":
1.18 attendee_attr = self.obj.get_value_map("ATTENDEE").get(self.user)
1.19 + method = "COUNTER"
1.20 +
1.21 + # Nothing else is supported.
1.22 +
1.23 + else:
1.24 + return None
1.25 +
1.26 + # For counter-proposals or new recurrences, set a new main period for
1.27 + # the event.
1.28 +
1.29 + if action == "counter" or have_new_recurrence:
1.30 period = self.obj.get_main_period(self.get_tzid())
1.31
1.32 # Use the existing or configured time zone for the specified
1.33 @@ -74,12 +84,6 @@
1.34 end = to_timezone(get_datetime(end), period.tzid)
1.35 period = RecurringPeriod(start, end, period.tzid, period.origin, period.get_start_attr(), period.get_end_attr())
1.36 self.obj.set_period(period)
1.37 - method = "COUNTER"
1.38 -
1.39 - # Nothing else is supported.
1.40 -
1.41 - else:
1.42 - return None
1.43
1.44 # Where no attendees remain, no message is generated.
1.45
1.46 @@ -111,7 +115,7 @@
1.47
1.48 try:
1.49 action, store_type, store_dir, journal_dir, preferences_dir, user = sys.argv[1:7]
1.50 - if action == "counter":
1.51 + if len(sys.argv) >= 10:
1.52 start, end = sys.argv[7:9]
1.53 i = 9
1.54 else:
1.55 @@ -125,9 +129,9 @@
1.56 <uid> <recurrence-id>
1.57
1.58 Need 'accept', 'counter' or 'decline', a store type, a store directory, a
1.59 -journal directory, a preferences directory, user URI, any counter-proposal
1.60 -datetimes (see below), plus the appropriate event UID and RECURRENCE-ID (if a
1.61 -recurrence is involved).
1.62 +journal directory, a preferences directory, user URI, any counter-proposal or
1.63 +new recurrence datetimes (see below), plus the appropriate event UID and
1.64 +RECURRENCE-ID (if a recurrence is involved).
1.65
1.66 The RECURRENCE-ID must be in exactly the form employed by the store, not a
1.67 different but equivalent representation, if the identifier is to refer to an
1.68 @@ -138,7 +142,8 @@
1.69 store.
1.70
1.71 If 'counter' has been indicated, alternative start and end datetimes are also
1.72 -required.
1.73 +required. If a specific recurrence is being separated from an event, such
1.74 +datetimes are also required in order to set the main period of the recurrence.
1.75 """
1.76 sys.exit(1)
1.77
2.1 --- a/tests/test_person_invitation_decline_instance.sh Tue Apr 19 00:53:59 2016 +0200
2.2 +++ b/tests/test_person_invitation_decline_instance.sh Tue Apr 19 17:57:28 2016 +0200
2.3 @@ -104,7 +104,7 @@
2.4
2.5 # Test recurrence declination in the outgoing handler.
2.6
2.7 - "$DECLINE_SCRIPT" $DECLINE_ARGS "$USER" "event26@example.com" "20141011T100000" 2>> $ERROR \
2.8 + "$DECLINE_SCRIPT" $DECLINE_ARGS "$USER" "20141011T100000" "20141011T110000" "event26@example.com" "20141011T100000" 2>> $ERROR \
2.9 | tee out5.tmp \
2.10 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
2.11