-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,12 +147,12 @@ | |
"ctuid4", | ||
"ctuid5", | ||
"ctuid6", | ||
"tsst1", | ||
"tsst2", | ||
"tsst3", | ||
"tsst4", | ||
"tsst5", | ||
"tsst6", | ||
"test1", | ||
"test2", | ||
"test3", | ||
"test4", | ||
"test5", | ||
"test6", | ||
) | ||
## TODO: todo7 is an item without uid. Should be taken care of somehow. | ||
|
||
|
@@ -337,6 +337,77 @@ | |
END:VCALENDAR | ||
""" | ||
|
||
attendee1=""" | ||
BEGIN:VCALENDAR | ||
PRODID:-//Example Corp.//CalDAV Client//EN | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
STATUS:CANCELLED | ||
UID:test-attendee1 | ||
X-MICROSOFT-DISALLOW-COUNTER:true | ||
DTSTART;TZID=Europe/Moscow:20240607T100000 | ||
DTEND;TZID=Europe/Moscow:20240607T103000 | ||
LAST-MODIFIED:20240610T063933Z | ||
DTSTAMP:20240618T063824Z | ||
CREATED:00010101T000000Z | ||
SUMMARY:test | ||
SEQUENCE:0 | ||
TRANSP:OPAQUE | ||
X-MOZ-LASTACK:20240610T063933Z | ||
ORGANIZER;CN=:mailto:[email protected] | ||
ATTENDEE;PARTSTAT=ACCEPTED;RSVP=true;ROLE=REQ-PARTICIPANT:mailto:[email protected] | ||
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=DECLINED:mailto:[email protected] | ||
END:VEVENT | ||
BEGIN:VTIMEZONE | ||
TZID:Europe/Moscow | ||
TZURL:http://tzurl.org/zoneinfo-outlook/Europe/Moscow | ||
X-LIC-LOCATION:Europe/Moscow | ||
BEGIN:STANDARD | ||
TZNAME:MSK | ||
TZOFFSETFROM:+0300 | ||
TZOFFSETTO:+0300 | ||
DTSTART:19700101T000000 | ||
END:STANDARD | ||
END:VTIMEZONE | ||
END:VCALENDAR | ||
""" | ||
|
||
BEGIN:VCALENDAR | ||
PRODID:-//MailRu//MailRu Calendar API -//EN | ||
VERSION:2.0 | ||
BEGIN:VEVENT | ||
STATUS:CANCELLED | ||
UID:EB424921-C4D3-46A6-B827-9A92A90D6788 | ||
X-MICROSOFT-DISALLOW-COUNTER:true | ||
DTSTART;TZID=Europe/Moscow:20240607T100000 | ||
DTEND;TZID=Europe/Moscow:20240607T103000 | ||
LAST-MODIFIED:20240610T063933Z | ||
DTSTAMP:20240618T064033Z | ||
CREATED:00010101T000000Z | ||
SUMMARY:test | ||
SEQUENCE:0 | ||
TRANSP:OPAQUE | ||
X-MOZ-LASTACK:20240610T063933Z | ||
ORGANIZER;CN=:mailto:knazarov@i-core.ru | ||
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;RSVP=true:mailto:knazarov@i | ||
-core.ru | ||
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=DECLINED:mailto:testemail2024@list.r | ||
u | ||
END:VEVENT | ||
BEGIN:VTIMEZONE | ||
TZID:Europe/Moscow | ||
TZURL:http://tzurl.org/zoneinfo-outlook/Europe/Moscow | ||
X-LIC-LOCATION:Europe/Moscow | ||
BEGIN:STANDARD | ||
TZNAME:MSK | ||
TZOFFSETFROM:+0300 | ||
TZOFFSETTO:+0300 | ||
DTSTART:19700101T000000 | ||
END:STANDARD | ||
END:VTIMEZONE | ||
END:VCALENDAR | ||
|
||
|
||
sched = sched_template % ( | ||
str(uuid.uuid4()), | ||
"%2i%2i%2i" % (random.randint(0, 23), random.randint(0, 59), random.randint(0, 59)), | ||
|
@@ -800,6 +871,15 @@ def testCreateDeleteCalendar(self): | |
with pytest.raises(self._notFound()): | ||
self.principal.calendar(name="Yep", cal_id=self.testcal_id).events() | ||
|
||
def testChangeAttendeeStatusWithEmailGiven(self): | ||
self.skip_on_compatibility_flag("read_only") | ||
c = self._fixCalendar() | ||
event = c.save_event(uid='test1', ical_fragment='ATTENDEE;ROLE=OPT-PARTICIPANT;PARTSTAT=TENTATIVE:MAILTO:[email protected]') | ||
event.change_attendee_status(attendee='[email protected]', PARTSTAT='ACCEPTED') | ||
event.save() | ||
event = c.event_by_uid('test1') | ||
import pdb; pdb.set_trace() | ||
|
||
def testCreateEvent(self): | ||
self.skip_on_compatibility_flag("read_only") | ||
c = self._fixCalendar() | ||
|
@@ -1347,39 +1427,39 @@ def testSearchSortTodo(self): | |
summary="1 task overdue", | ||
due=date(2022, 12, 12), | ||
dtstart=date(2022, 10, 11), | ||
uid="tsst1", | ||
uid="test1", | ||
) | ||
t2 = c.save_todo( | ||
summary="2 task future", | ||
due=datetime.now() + timedelta(hours=15), | ||
dtstart=datetime.now() + timedelta(minutes=15), | ||
uid="tsst2", | ||
uid="test2", | ||
) | ||
t3 = c.save_todo( | ||
summary="3 task future due", | ||
due=datetime.now() + timedelta(hours=15), | ||
dtstart=datetime(2022, 12, 11, 10, 9, 8), | ||
uid="tsst3", | ||
uid="test3", | ||
) | ||
t4 = c.save_todo( | ||
summary="4 task priority is set to nine which is the lowest", | ||
priority=9, | ||
uid="tsst4", | ||
uid="test4", | ||
) | ||
t5 = c.save_todo( | ||
summary="5 task status is set to COMPLETED and this will disappear from the ordinary todo search", | ||
status="COMPLETED", | ||
uid="tsst5", | ||
uid="test5", | ||
) | ||
t6 = c.save_todo( | ||
summary="6 task has categories", | ||
categories="home,garden,sunshine", | ||
uid="tsst6", | ||
uid="test6", | ||
) | ||
|
||
def check_order(tasks, order): | ||
assert [str(x.icalendar_component["uid"]) for x in tasks] == [ | ||
"tsst" + str(x) for x in order | ||
"test" + str(x) for x in order | ||
] | ||
|
||
all_tasks = c.search(todo=True, sort_keys=("uid",)) | ||
|