mirror of
https://github.com/django-components/django-components.git
synced 2025-08-30 18:57:20 +00:00
refactor: remove use of eval for node validation (#944)
This commit is contained in:
parent
de32d449d9
commit
f52f12579b
5 changed files with 216 additions and 101 deletions
|
@ -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"}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue