diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2011-04-26 18:22:40 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2011-04-26 18:22:40 -0400 |
commit | a3fdc8218265ab5b27f3096e7aac3b7929240c0e (patch) | |
tree | ac22f62097c44efc8644143db332f3d954f3aed0 | |
parent | c219bbfc3f9db68d6de90b036cfe25a5711dc120 (diff) | |
parent | e458567ca7bc7fea2db88001ca0b79b7b7a4afb8 (diff) | |
download | askbot-a3fdc8218265ab5b27f3096e7aac3b7929240c0e.tar.gz askbot-a3fdc8218265ab5b27f3096e7aac3b7929240c0e.tar.bz2 askbot-a3fdc8218265ab5b27f3096e7aac3b7929240c0e.zip |
Merge branch 'andrei-askbot'
-rw-r--r-- | askbot/tests/email_alert_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/askbot/tests/email_alert_tests.py b/askbot/tests/email_alert_tests.py index 0c239be1..902677e7 100644 --- a/askbot/tests/email_alert_tests.py +++ b/askbot/tests/email_alert_tests.py @@ -27,7 +27,10 @@ def email_alert_test(test_func): func_name = test_func.__name__ if func_name.startswith('test_'): test_name = func_name.replace('test_', '', 1) + #run the main codo of the test function test_func(test_object) + #if visit_timestamp is set, + #target user will visit the question at that time test_object.maybe_visit_question() test_object.send_alerts() test_object.check_results(test_name) @@ -283,11 +286,14 @@ class EmailAlertTests(TestCase): self.__class__.__name__, test_key, ) + #compares number of emails in the outbox and + #the expected message count for the current test self.assertEqual(len(outbox), expected['message_count'], error_message) if expected['message_count'] > 0: if len(outbox) > 0: error_message = 'expected recipient %s found %s' % \ (self.target_user.email, outbox[0].recipients()[0]) + #verify that target user receives the email self.assertEqual( outbox[0].recipients()[0], self.target_user.email, |