diff options
| author | Tim Graham <timograham@gmail.com> | 2017-06-17 08:12:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-17 08:12:05 -0400 |
| commit | 3b050fd0d0b8dbf499bdb44ce12fa926298c0bd0 (patch) | |
| tree | 221f107ffc5324bc3bec9a111d5d417df912ee2e /tests | |
| parent | 2b09e4c88e96cb03b29f5a6b0e4838ab4271e631 (diff) | |
Fixed #28303 -- Prevented localization of attribute values in the DTL attrs.html widget template.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/forms_tests/widget_tests/test_numberinput.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/forms_tests/widget_tests/test_numberinput.py b/tests/forms_tests/widget_tests/test_numberinput.py new file mode 100644 index 0000000000..95a0a9250a --- /dev/null +++ b/tests/forms_tests/widget_tests/test_numberinput.py @@ -0,0 +1,15 @@ +from django.forms.widgets import NumberInput +from django.test import override_settings + +from .base import WidgetTest + + +class NumberInputTests(WidgetTest): + + @override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True) + def test_attrs_not_localized(self): + widget = NumberInput(attrs={'max': 12345, 'min': 1234, 'step': 9999}) + self.check_html( + widget, 'name', 'value', + '<input type="number" name="name" value="value" max="12345" min="1234" step="9999" />' + ) |
