Changeset 1465 in products
- Timestamp:
- Dec 21, 2009 2:02:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/testQPloneCommentsNotification.py
r880 r1465 7 7 8 8 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 9 9 import base64 10 from email import message_from_string 10 11 from quintagroup.plonecomments.utils import getMsg 11 12 from base import getToolByName, FunctionalTestCase … … 175 176 reply.deleteDiscussion() 176 177 mails = getMails() 177 regexp = re.compile("Subject:\s*(.*?)$",re.M)178 subj ect = str(Header('Your comment on "Doc" was not approved', 'utf-8'))179 self.failUnless([1 for m in mails if regexp.search(m).group(1)== subject],178 subject = str(Header('Your comment on Doc was not approved', 'utf-8')) 179 subjs = [message_from_string(m)['Subject'] for m in mails] 180 self.failUnless([1 for m in subjs if m == subject], 180 181 'No notification for rejecting comment.' % properties) 181 182
Note: See TracChangeset
for help on using the changeset viewer.