Loading tests/comment_tests/tests/comment_utils_moderators_tests.py +6 −4 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -67,6 +68,7 @@ class CommentUtilsModeratorTests(CommentTestCase): self.assertRaises(AlreadyModerated, moderator.register, Entry, EntryModerator1) def testEmailNotification(self): with override_settings(MANAGERS=("test@example.com",)): moderator.register(Entry, EntryModerator1) self.createSomeComments() self.assertEqual(len(mail.outbox), 2) Loading tests/runtests.py +0 −4 Original line number Diff line number Diff line Loading @@ -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() Loading Loading
tests/comment_tests/tests/comment_utils_moderators_tests.py +6 −4 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -67,6 +68,7 @@ class CommentUtilsModeratorTests(CommentTestCase): self.assertRaises(AlreadyModerated, moderator.register, Entry, EntryModerator1) def testEmailNotification(self): with override_settings(MANAGERS=("test@example.com",)): moderator.register(Entry, EntryModerator1) self.createSomeComments() self.assertEqual(len(mail.outbox), 2) Loading
tests/runtests.py +0 −4 Original line number Diff line number Diff line Loading @@ -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() Loading