refactor: remove use of eval for node validation (#944)

This commit is contained in:
Juro Oravec 2025-02-02 10:35:39 +01:00 committed by GitHub
parent de32d449d9
commit f52f12579b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 216 additions and 101 deletions

View file

@ -128,7 +128,7 @@ class HtmlAttrsTests(BaseTestCase):
template = Template(self.template_str)
with self.assertRaisesMessage(
TypeError, "Invalid parameters for tag 'html_attrs': too many positional arguments"
TypeError, "Invalid parameters for tag 'html_attrs': takes 2 positional argument(s) but more were given"
):
template.render(Context({"class_var": "padding-top-8"}))
@ -269,7 +269,7 @@ class HtmlAttrsTests(BaseTestCase):
template = Template(self.template_str)
with self.assertRaisesMessage(
TypeError, "Invalid parameters for tag 'html_attrs': multiple values for argument 'attrs'"
TypeError, "Invalid parameters for tag 'html_attrs': got multiple values for argument 'attrs'"
):
template.render(Context({"class_var": "padding-top-8"}))