2017-06-17 20:12:05 +08:00
|
|
|
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',
|
2018-01-21 15:09:10 +08:00
|
|
|
'<input type="number" name="name" value="value" max="12345" min="1234" step="9999">'
|
2017-06-17 20:12:05 +08:00
|
|
|
)
|