Changeset 9306 for main/waeup.kofa/trunk/src/waeup/kofa/tests
- Timestamp:
- 7 Oct 2012, 08:32:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_smtp.py
r8382 r9306 45 45 # Maybe existing receiver of externally sent mail. If this mail account 46 46 # exists really, it might receive mail from the tests! 47 EXTERNAL_MAIL_RECEIVER = 'no- user@waeup.org'47 EXTERNAL_MAIL_RECEIVER = 'no-reply@waeup.org' 48 48 49 49 # Names of mail deliveries to use when external mail tests are enabled. … … 340 340 341 341 @external_mail_test 342 def test_send_direct_mails(self): 343 # send several mails using direct mail delivery 344 self.app['configuration'].smtp_mailer = EXTERNAL_DIRECT_DELIVERY 345 setSite(self.app) 346 result = send_mail( 347 'test program', 'no-reply@waeup.org', 348 'test mail receiver', 349 '%s, %s' % (EXTERNAL_MAIL_RECEIVER, EXTERNAL_MAIL_RECEIVER), 350 'Test Mail from WAeUP Kofa', 351 'Hi from test mailer!\n\nRegards,\nTest Programme\n' 352 ) 353 import transaction 354 transaction.commit() # The mail is really sent when transactions is 355 # committed 356 self.assertTrue('@' in result) 357 return 358 359 @external_mail_test 342 360 def test_send_queued_mail(self): 343 361 # send mail using queued mail delivery
Note: See TracChangeset for help on using the changeset viewer.