mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
committed by
Mariusz Felisiak
parent
f68fa8b45d
commit
9c19aff7c7
@@ -4,12 +4,20 @@ from .base import WidgetTest
|
||||
|
||||
|
||||
class InputTests(WidgetTest):
|
||||
|
||||
def test_attrs_with_type(self):
|
||||
attrs = {'type': 'date'}
|
||||
attrs = {"type": "date"}
|
||||
widget = Input(attrs)
|
||||
self.check_html(widget, 'name', 'value', '<input type="date" name="name" value="value">')
|
||||
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">')
|
||||
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">'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user