summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-08-23 14:12:13 -0400
committerThomas Bruederli <bruederli@kolabsys.com>2014-08-23 14:12:13 -0400
commit62df71a225fc2dbc2351a9e8ac211546c6af4ac8 (patch)
tree2f2993d2122c6053c8e6bc39f3da9194463cf610 /tests
parentd9f0b4336e151e5cb29b911f1e823289c3dc78bf (diff)
downloadpykolab-62df71a225fc2dbc2351a9e8ac211546c6af4ac8.tar.gz
Store confidential iTip invitation events in a dedicated folder - if exists (#3639)
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/test_wallace/test_007_invitationpolicy.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/functional/test_wallace/test_007_invitationpolicy.py b/tests/functional/test_wallace/test_007_invitationpolicy.py
index c3be462..4807313 100644
--- a/tests/functional/test_wallace/test_007_invitationpolicy.py
+++ b/tests/functional/test_wallace/test_007_invitationpolicy.py
@@ -261,6 +261,7 @@ class TestWallaceInvitationpolicy(unittest.TestCase):
'mailbox': 'user/jane.manager@example.org',
'kolabcalendarfolder': 'user/jane.manager/Calendar@example.org',
'kolabtasksfolder': 'user/jane.manager/Tasks@example.org',
+ 'kolabconfidentialcalendar': 'user/jane.manager/Calendar/Confidential@example.org',
'kolabinvitationpolicy': ['ACT_ACCEPT_IF_NO_CONFLICT','ACT_REJECT_IF_CONFLICT','TASK_ACCEPT','ACT_UPDATE']
}
@@ -301,6 +302,20 @@ class TestWallaceInvitationpolicy(unittest.TestCase):
from tests.functional.synchronize import synchronize_once
synchronize_once()
+ # create confidential calendar folder for jane
+ imap = IMAP()
+ imap.connect(domain='example.org') # sets self.domain
+ imap.user_mailbox_create_additional_folders(self.jane['mail'], {
+ 'Calendar/Confidential': {
+ 'annotations': {
+ '/shared/vendor/kolab/folder-type': "event",
+ '/private/vendor/kolab/folder-type': "event.confidential"
+ }
+ }
+ })
+ imap.disconnect()
+
+
def send_message(self, itip_payload, to_addr, from_addr=None, method="REQUEST"):
if from_addr is None:
from_addr = self.john['mail']
@@ -933,6 +948,16 @@ class TestWallaceInvitationpolicy(unittest.TestCase):
self.assertEqual(notification, None)
+ def test_012_confidential_invitation(self):
+ start = datetime.datetime(2014,9,21, 9,30,0)
+ uid = self.send_itip_invitation(self.jane['mail'], start, summary='confidential', template=itip_invitation.replace("DESCRIPTION:test", "CLASS:CONFIDENTIAL"))
+
+ # check event being stored in the folder annotared with event.confidential
+ event = self.check_user_calendar_event(self.jane['kolabconfidentialcalendar'], uid)
+ self.assertIsInstance(event, pykolab.xml.Event)
+ self.assertEqual(event.get_summary(), "confidential")
+
+
def test_020_task_assignment_accept(self):
start = datetime.datetime(2014,9,10, 19,0,0)
uid = self.send_itip_invitation(self.jane['mail'], start, summary='work', template=itip_todo)