From e458567ca7bc7fea2db88001ca0b79b7b7a4afb8 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 26 Apr 2011 00:13:32 -0400 Subject: commented in email alert test code --- askbot/tests/email_alert_tests.py | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- cgit v1.2.3-1-g7c22