Skip to content

Commit

Permalink
Mailing page object test: also mail list length.
Browse files Browse the repository at this point in the history
  • Loading branch information
jone committed Apr 30, 2013
1 parent 90d0a44 commit 1909205
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ftw/testing/tests/test_pages_mailing.py
Expand Up @@ -26,7 +26,13 @@ def test_mailing_mock(self):
'There should be one message in the MockMailHost,'
' but there was none.')

self.assertEquals(
1, len(Mailing(self.layer['portal']).get_messages()),
'Expected exactly one email in the MockMailHost.')
message = Mailing(self.layer['portal']).pop().split('\n')
self.assertEquals(
0, len(Mailing(self.layer['portal']).get_messages()),
'Expected no email in the MockMailHost after popping.')

# replace "Date: ..." - it changes constantly.
message = [line.startswith('Date:') and 'Date: ---' or line
Expand Down

0 comments on commit 1909205

Please sign in to comment.