diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2013-03-11 10:04:58 -0500 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2013-03-11 15:38:53 -0500 |
| commit | d0561242699ed29527b9ab1dabe8a668e519eba5 (patch) | |
| tree | 99d33f7479e38b83835d6872a0fa90448b814ad6 | |
| parent | 571b2d139baa81ae9a0afea88c5b570a2d16d313 (diff) | |
Remove a special case for comment tests from runtests.py.
| -rw-r--r-- | tests/comment_tests/tests/comment_utils_moderators_tests.py | 10 | ||||
| -rwxr-xr-x | tests/runtests.py | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/tests/comment_tests/tests/comment_utils_moderators_tests.py b/tests/comment_tests/tests/comment_utils_moderators_tests.py index eab87ef53b..6c7a882e25 100644 --- a/tests/comment_tests/tests/comment_utils_moderators_tests.py +++ b/tests/comment_tests/tests/comment_utils_moderators_tests.py @@ -4,6 +4,7 @@ from django.contrib.comments.models import Comment from django.contrib.comments.moderation import (moderator, CommentModerator, AlreadyModerated) from django.core import mail +from django.test.utils import override_settings from . import CommentTestCase from ..models import Entry @@ -67,9 +68,10 @@ class CommentUtilsModeratorTests(CommentTestCase): self.assertRaises(AlreadyModerated, moderator.register, Entry, EntryModerator1) def testEmailNotification(self): - moderator.register(Entry, EntryModerator1) - self.createSomeComments() - self.assertEqual(len(mail.outbox), 2) + with override_settings(MANAGERS=("test@example.com",)): + moderator.register(Entry, EntryModerator1) + self.createSomeComments() + self.assertEqual(len(mail.outbox), 2) def testCommentsEnabled(self): moderator.register(Entry, EntryModerator2) @@ -94,4 +96,4 @@ class CommentUtilsModeratorTests(CommentTestCase): def testAutoCloseFieldImmediate(self): moderator.register(Entry, EntryModerator6) c1, c2 = self.createSomeComments() - self.assertEqual(Comment.objects.all().count(), 0)
\ No newline at end of file + self.assertEqual(Comment.objects.all().count(), 0) diff --git a/tests/runtests.py b/tests/runtests.py index f2cd933776..f0cba38b80 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -80,10 +80,6 @@ def setup(verbosity, test_labels): settings.TEMPLATE_DIRS = (os.path.join(RUNTESTS_DIR, TEST_TEMPLATE_DIR),) settings.LANGUAGE_CODE = 'en' settings.SITE_ID = 1 - # For testing comment-utils, we require the MANAGERS attribute - # to be set, so that a test email is sent out which we catch - # in our tests. - settings.MANAGERS = ("admin@djangoproject.com",) # Load all the ALWAYS_INSTALLED_APPS. get_apps() |
