torchbox / tbxforms

A Torchbox-flavoured template pack for django-crispy-forms, adapted from crispy-forms-gds.

Home Page:https://pypi.org/project/tbxforms/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No tests for `TBXFORMS_ALLOW_HTML_LABEL`, `TBXFORMS_ALLOW_HTML_HELP_TEXT` and `TBXFORMS_ALLOW_HTML_BUTTON`

kbayliss opened this issue · comments

We should add unit tests for TBXFORMS_ALLOW_HTML_LABEL, TBXFORMS_ALLOW_HTML_HELP_TEXT and TBXFORMS_ALLOW_HTML_BUTTON to prevent future regression.

Tests aren't even using the correct base class btw: https://github.com/torchbox/tbxforms/blob/main/tests/forms.py#L12 After fixing that the markup becomes completely different for basically all tests.

I wonder if it's even useful to test that the rendered html matches something exactly. Instead it might be better to just test if the correct template is used. Or check if it contains certain strings or elements. It might be worth rewriting these instead of updating dozens of html files in tests.

Closing as these settings are no longer supported as of https://github.com/torchbox/tbxforms/releases/tag/v2.0.0