2017-06-17 12:12:05 +00:00
|
|
|
from django.forms.widgets import NumberInput
|
|
|
|
from django.test import override_settings
|
|
|
|
|
|
|
|
from .base import WidgetTest
|
|
|
|
|
|
|
|
|
|
|
|
class NumberInputTests(WidgetTest):
|
|
|
|
|
2021-09-09 05:42:05 +00:00
|
|
|
@override_settings(USE_THOUSAND_SEPARATOR=True)
|
2017-06-17 12:12:05 +00:00
|
|
|
def test_attrs_not_localized(self):
|
|
|
|
widget = NumberInput(attrs={'max': 12345, 'min': 1234, 'step': 9999})
|
|
|
|
self.check_html(
|
|
|
|
widget, 'name', 'value',
|
2018-01-21 07:09:10 +00:00
|
|
|
'<input type="number" name="name" value="value" max="12345" min="1234" step="9999">'
|
2017-06-17 12:12:05 +00:00
|
|
|
)
|