Changeset View
Changeset View
Standalone View
Standalone View
tests/functional/test_wallace/test_007_invitationpolicy.py
Show First 20 Lines • Show All 905 Lines • ▼ Show 20 Lines | def test_008_inivtation_reply_notify(self): | ||||
# send a reply from mark to john | # send a reply from mark to john | ||||
self.send_itip_reply(uid, self.mark['mail'], self.john['mail'], start=start, partstat='ACCEPTED') | self.send_itip_reply(uid, self.mark['mail'], self.john['mail'], start=start, partstat='ACCEPTED') | ||||
notification = self.check_message_received(_('"%s" has been updated') % ('test'), self.john['mail']) | notification = self.check_message_received(_('"%s" has been updated') % ('test'), self.john['mail']) | ||||
self.assertIsInstance(notification, email.message.Message) | self.assertIsInstance(notification, email.message.Message) | ||||
notification_text = str(notification.get_payload()) | notification_text = str(notification.get_payload()) | ||||
self.assertIn(self.jane['mail'], notification_text) | self.assertIn(self.jane['mail'], notification_text) | ||||
self.assertIn(_("PENDING"), notification_text) | self.assertIn(_("Pending"), notification_text) | ||||
self.purge_mailbox(self.john['mailbox']) | self.purge_mailbox(self.john['mailbox']) | ||||
# send a reply from mark to john | # send a reply from mark to john | ||||
self.send_itip_reply(uid, self.jack['mail'], self.john['mail'], start=start, partstat='ACCEPTED') | self.send_itip_reply(uid, self.jack['mail'], self.john['mail'], start=start, partstat='ACCEPTED') | ||||
# this triggers an additional notification | # this triggers an additional notification | ||||
notification = self.check_message_received(_('"%s" has been updated') % ('test'), self.john['mail']) | notification = self.check_message_received(_('"%s" has been updated') % ('test'), self.john['mail']) | ||||
self.assertIsInstance(notification, email.message.Message) | self.assertIsInstance(notification, email.message.Message) | ||||
notification_text = str(notification.get_payload()) | notification_text = str(notification.get_payload()) | ||||
self.assertNotIn(_("PENDING"), notification_text) | self.assertNotIn(_("Pending"), notification_text) | ||||
def test_008_notify_translated(self): | def test_008_notify_translated(self): | ||||
self.purge_mailbox(self.mark['mailbox']) | self.purge_mailbox(self.mark['mailbox']) | ||||
start = datetime.datetime(2014, 8, 12, 16, 0, 0, tzinfo=pytz.timezone("Europe/Berlin")) | start = datetime.datetime(2014, 8, 12, 16, 0, 0, tzinfo=pytz.timezone("Europe/Berlin")) | ||||
uid = self.create_calendar_event(start, user=self.mark, attendees=[self.jane]) | uid = self.create_calendar_event(start, user=self.mark, attendees=[self.jane]) | ||||
# send a reply from jane to mark | # send a reply from jane to mark | ||||
▲ Show 20 Lines • Show All 463 Lines • Show Last 20 Lines |