summaryrefslogtreecommitdiff
path: root/tests/utils_tests
diff options
context:
space:
mode:
authorSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-12-12 17:01:49 +0100
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-15 22:28:37 +0100
commit1e331911a88f289f52e3d81340e209d0b78abdbb (patch)
tree024e5262f039d73f86eacf8251ee0cdedbf7186b /tests/utils_tests
parent8081557508b197af975e0c6306d9b2af5e57d477 (diff)
Refs #34609 -- Removed support for calling format_html() without arguments per deprecation timeline.
Diffstat (limited to 'tests/utils_tests')
-rw-r--r--tests/utils_tests/test_html.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
index 0beaf98bff..88bfa24925 100644
--- a/tests/utils_tests/test_html.py
+++ b/tests/utils_tests/test_html.py
@@ -4,7 +4,6 @@ from datetime import datetime
from django.core.exceptions import SuspiciousOperation
from django.core.serializers.json import DjangoJSONEncoder
from django.test import SimpleTestCase
-from django.utils.deprecation import RemovedInDjango60Warning
from django.utils.functional import lazystr
from django.utils.html import (
conditional_escape,
@@ -69,14 +68,10 @@ class TestUtilsHtml(SimpleTestCase):
)
def test_format_html_no_params(self):
- msg = "Calling format_html() without passing args or kwargs is deprecated."
- # RemovedInDjango60Warning: when the deprecation ends, replace with:
- # msg = "args or kwargs must be provided."
- # with self.assertRaisesMessage(TypeError, msg):
- with self.assertWarnsMessage(RemovedInDjango60Warning, msg) as ctx:
+ msg = "args or kwargs must be provided."
+ with self.assertRaisesMessage(TypeError, msg):
name = "Adam"
self.assertEqual(format_html(f"<i>{name}</i>"), "<i>Adam</i>")
- self.assertEqual(ctx.filename, __file__)
def test_format_html_join_with_positional_arguments(self):
self.assertEqual(