summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-26 12:27:30 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-03-26 12:28:33 +0100
commitefb26f1b8d74cd02b7c280bf3f49f35c08661cf0 (patch)
treef6c207017d86635ee0c6884930aafdd969834ec5
parent6a80fd1465277d465c146cab57ffa41cbae1c5ce (diff)
downloaddjango-efb26f1b8d74cd02b7c280bf3f49f35c08661cf0.tar.gz
[4.0.x] Reverted "Fixed forms_tests.tests.test_renderers with Jinja 3.1.0+."
This reverts commit 1d9d082acf6e152c06833bb9698f88d688b95e40. Backport of abfdb4d7f384fb06ed9b7ca37b548542df7b5dda from main
-rw-r--r--tests/forms_tests/tests/test_renderers.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/forms_tests/tests/test_renderers.py b/tests/forms_tests/tests/test_renderers.py
index 27429ac749..3e973ad8fc 100644
--- a/tests/forms_tests/tests/test_renderers.py
+++ b/tests/forms_tests/tests/test_renderers.py
@@ -1,5 +1,4 @@
import os
-import posixpath
import unittest
from django.forms.renderers import (
@@ -9,7 +8,6 @@ from django.forms.renderers import (
TemplatesSetting,
)
from django.test import SimpleTestCase
-from django.utils.version import get_version_tuple
try:
import jinja2
@@ -52,28 +50,6 @@ class Jinja2Tests(SharedTests, SimpleTestCase):
renderer = Jinja2
expected_widget_dir = "jinja2"
- @property
- def jinja2_version(self):
- return get_version_tuple(jinja2.__version__)
-
- def test_installed_apps_template_found(self):
- """Can find a custom template in INSTALLED_APPS."""
- renderer = self.renderer()
- # Found because forms_tests is .
- tpl = renderer.get_template("forms_tests/custom_widget.html")
- expected_path = os.path.abspath(
- os.path.join(os.path.dirname(__file__), "..", self.expected_widget_dir)
- )
- if self.jinja2_version < (3, 1):
- expected_path = os.path.join(
- expected_path, "forms_tests", "custom_widget.html"
- )
- else:
- expected_path = posixpath.join(
- expected_path, "forms_tests", "custom_widget.html"
- )
- self.assertEqual(tpl.origin.name, expected_path)
-
class TemplatesSettingTests(SharedTests, SimpleTestCase):
renderer = TemplatesSetting