mirror of
https://github.com/django/django.git
synced 2024-12-28 03:55:50 +00:00
6872ce2266
Regression in b52c73008a
.
16 lines
626 B
Python
16 lines
626 B
Python
from django.forms.widgets import Input
|
|
|
|
from .base import WidgetTest
|
|
|
|
|
|
class InputTests(WidgetTest):
|
|
|
|
def test_attrs_with_type(self):
|
|
attrs = {'type': 'date'}
|
|
widget = Input(attrs)
|
|
self.check_html(widget, 'name', 'value', '<input type="date" name="name" value="value" />')
|
|
# reuse the same attrs for another widget
|
|
self.check_html(Input(attrs), 'name', 'value', '<input type="date" name="name" value="value" />')
|
|
attrs['type'] = 'number' # shouldn't change the widget type
|
|
self.check_html(widget, 'name', 'value', '<input type="date" name="name" value="value" />')
|