diff options
author | Andrei <mamoutkine@gmail.com> | 2011-04-26 00:13:32 -0400 |
---|---|---|
committer | Andrei <mamoutkine@gmail.com> | 2011-04-26 00:13:32 -0400 |
commit | e458567ca7bc7fea2db88001ca0b79b7b7a4afb8 (patch) | |
tree | b9d37977016946d8701d128a6b0812b3666e62fc | |
parent | 15e9b1e454362214638d4333164deb82d9431df1 (diff) | |
download | askbot-e458567ca7bc7fea2db88001ca0b79b7b7a4afb8.tar.gz askbot-e458567ca7bc7fea2db88001ca0b79b7b7a4afb8.tar.bz2 askbot-e458567ca7bc7fea2db88001ca0b79b7b7a4afb8.zip |
commented in email alert test code
-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, |