diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-23 10:37:34 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-12-23 21:37:56 +0100 |
| commit | da16bb30ff238aa4d59b4186d92ef5429d8d0045 (patch) | |
| tree | dfda0b750aa0d3a71c4751edcb7b86f3517e2b3f /tests/comment_tests | |
| parent | 5241763c81b6afe1c0327ff7eb0d75c643f24ce0 (diff) | |
Dropped AppCache._empty, _with_app and _without_app.
It's now easier to achieve the same effect with modify_settings or
override_settings.
Diffstat (limited to 'tests/comment_tests')
| -rw-r--r-- | tests/comment_tests/tests/test_app_api.py | 10 |
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) |
