summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-05 07:14:13 -0500
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-05 07:14:13 -0500
commitb3afa468579586b62aee849779c89d0104c3d21e (patch)
tree750704c3599e1ca001f1130bdda0f7248c992de5 /tests
parentcfe5378af4eb9bbe6c210f85263c23842f6ca490 (diff)
downloadpykolab-b3afa468579586b62aee849779c89d0104c3d21e.tar.gz
Test handling of (some) invalid iTip messages to resources
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/test_wallace/test_005_resource_invitation.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/test_wallace/test_005_resource_invitation.py b/tests/functional/test_wallace/test_005_resource_invitation.py
index 1800e19..53ed2ec 100644
--- a/tests/functional/test_wallace/test_005_resource_invitation.py
+++ b/tests/functional/test_wallace/test_005_resource_invitation.py
@@ -505,3 +505,18 @@ class TestResourceInvitation(unittest.TestCase):
uid3 = self.send_itip_invitation(self.audi['mail'], datetime.datetime(2014,2,22, 8,0,0), template=itip_recurring)
accept = self.check_message_received("Reservation Request for test was ACCEPTED")
self.assertIsInstance(accept, email.message.Message)
+
+
+ def test_010_invalid_bookings(self):
+ self.purge_mailbox(self.john['mailbox'])
+
+ itip_other = itip_invitation.replace("mailto:%s", "mailto:some-other-resource@example.org\nDESCRIPTION: Sent to %s")
+ self.send_itip_invitation(self.audi['mail'], datetime.datetime(2014,3,22, 8,0,0), template=itip_other)
+
+ time.sleep(1)
+
+ itip_invalid = itip_invitation.replace("DTSTART;", "X-DTSTART;")
+ self.send_itip_invitation(self.audi['mail'], datetime.datetime(2014,3,24, 19,30,0), template=itip_invalid)
+
+ self.assertEqual(self.check_message_received("Reservation Request for test was ACCEPTED", self.audi['mail']), None)
+