summaryrefslogtreecommitdiff
path: root/tests/comment_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/comment_tests')
-rw-r--r--tests/comment_tests/tests/test_app_api.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/comment_tests/tests/test_app_api.py b/tests/comment_tests/tests/test_app_api.py
index 7098def28a..3d88b7e896 100644
--- a/tests/comment_tests/tests/test_app_api.py
+++ b/tests/comment_tests/tests/test_app_api.py
@@ -1,10 +1,9 @@
-from django.apps import app_cache
from django.conf import settings
from django.contrib import comments
from django.contrib.comments.models import Comment
from django.contrib.comments.forms import CommentForm
from django.core.exceptions import ImproperlyConfigured
-from django.test.utils import override_settings
+from django.test import modify_settings, override_settings
from django.utils import six
from . import CommentTestCase
@@ -35,16 +34,11 @@ class CommentAppAPITests(CommentTestCase):
self.assertEqual(comments.get_approve_url(c), "/approve/12345/")
+@modify_settings(INSTALLED_APPS={'append': 'comment_tests.custom_comments'})
@override_settings(COMMENTS_APP='comment_tests.custom_comments')
class CustomCommentTest(CommentTestCase):
urls = 'comment_tests.urls'
- def setUp(self):
- self._with_custom_comments = app_cache._begin_with_app('comment_tests.custom_comments')
-
- def tearDown(self):
- app_cache._end_with_app(self._with_custom_comments)
-
def testGetCommentApp(self):
from comment_tests import custom_comments
self.assertEqual(comments.get_comment_app(), custom_comments)