source: products/quintagroup.plonecomments/trunk/quintagroup/plonecomments/tests/helperNotify.py @ 3119

Last change on this file since 3119 was 3119, checked in by kroman0, 13 years ago

Pyflakes and pep8 fixes #6

File size: 707 bytes
RevLine 
[832]1#########################################################
2##      Helper methods for testing Mail sending        ##
3#########################################################
4
5ALL_PROPS = ['enable_approve_user_notification', 'enable_reply_user_notification',
6             'enable_rejected_user_notification','enable_moderation',
7             'require_email', 'enable_anonymous_commenting',
8             'enable_published_notification', 'enable_approve_notification']
9
10def setProperties(prop_sheet, *props):
11    for p in ALL_PROPS:
12        prop_sheet._updateProperty(p, p in props)
13
[1633]14def testMailExistance(sel):
15    mailhost = sel.portal.MailHost
[3119]16    if mailhost.messages:
[1633]17        return True
[832]18    return False
Note: See TracBrowser for help on using the repository browser.