Ticket #27712: 27712.diff

File 27712.diff, 1.0 KB (added by Mariusz Felisiak, 8 years ago)
  • tests/forms_tests/widget_tests/test_widget.py

    diff --git a/tests/forms_tests/widget_tests/test_widget.py b/tests/forms_tests/widget_tests/test_widget.py
    index 595748a..6ba78c9 100644
    a b  
    11from __future__ import unicode_literals
    22
    33from django.forms import Widget
    4 from django.forms.widgets import Input
     4from django.forms.widgets import Input, TextInput
    55
    66from .base import WidgetTest
    77
    class WidgetTests(WidgetTest):  
    1515
    1616    def test_no_trailing_newline_in_attrs(self):
    1717        self.check_html(Input(), 'name', 'value', strict=True, html='<input type="None" name="name" value="value" />')
     18
     19    def test_type_passed(self):
     20        attrs = {'type': 'date'}
     21        self.check_html(TextInput(attrs), 'name', 'value', strict=True, html=(
     22            '<input type="date" name="name" value="value" />'
     23        ))
     24        self.check_html(TextInput(attrs), 'name', 'value', strict=True, html=(
     25            '<input type="date" name="name" value="value" />'
     26        ))
Back to Top