1
0
mirror of https://github.com/django/django.git synced 2024-12-25 02:26:12 +00:00
django/tests/forms_tests/widget_tests/test_numberinput.py
Claude Paroz 676bd084f2 Fixed #32873 -- Deprecated settings.USE_L10N.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-09-14 12:05:43 +02:00

16 lines
495 B
Python

from django.forms.widgets import NumberInput
from django.test import override_settings
from .base import WidgetTest
class NumberInputTests(WidgetTest):
@override_settings(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">'
)