summaryrefslogtreecommitdiff
path: root/tests/admin_docs
diff options
context:
space:
mode:
authorKai Richard Koenig <kai.richard.koenig@googlemail.com>2015-06-04 12:18:27 +0200
committerTim Graham <timograham@gmail.com>2015-06-11 20:26:27 -0400
commit3c593ba79e5bdee46419e2aa6b14e7ce8bc01758 (patch)
treebbc864e54d95cc1e99df83faaf82e56875e3e556 /tests/admin_docs
parentb34d16b78df3b424c3fae4f0b30b6b7a2cbf4543 (diff)
Refs #24125 -- Added admin_docs tests for multiple template engines.
This adds a test for 511a53b3142551a1bc3093ed1b6655f57634f510
Diffstat (limited to 'tests/admin_docs')
-rw-r--r--tests/admin_docs/tests.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/admin_docs/tests.py b/tests/admin_docs/tests.py
index 76366714ec..51d03ebd77 100644
--- a/tests/admin_docs/tests.py
+++ b/tests/admin_docs/tests.py
@@ -138,6 +138,30 @@ class AdminDocViewTests(TestDataMixin, AdminDocsTestCase):
utils.docutils_is_available = True
+@override_settings(TEMPLATES=[{
+ 'NAME': 'ONE',
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'APP_DIRS': True,
+}, {
+ 'NAME': 'TWO',
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'APP_DIRS': True,
+}])
+@unittest.skipUnless(utils.docutils_is_available, "no docutils installed.")
+class AdminDocViewWithMultipleEngines(AdminDocViewTests):
+ def test_templatefilter_index(self):
+ # Overridden because non-trivial TEMPLATES settings aren't supported
+ # but the page shouldn't crash (#24125).
+ response = self.client.get(reverse('django-admindocs-filters'))
+ self.assertContains(response, '<title>Template filters</title>', html=True)
+
+ def test_templatetag_index(self):
+ # Overridden because non-trivial TEMPLATES settings aren't supported
+ # but the page shouldn't crash (#24125).
+ response = self.client.get(reverse('django-admindocs-tags'))
+ self.assertContains(response, '<title>Template tags</title>', html=True)
+
+
class XViewMiddlewareTest(TestDataMixin, AdminDocsTestCase):
def test_xview_func(self):