mirror of
https://github.com/django/django.git
synced 2024-12-24 10:05:46 +00:00
12cefee5d8
Removed the trailing newline from widget attrs.html template. The solution may be revisited by fixing refs #9198 but not for Django 1.11. Thanks Dmitry Ivanchenko for the report and Preston Timmons for advice.
18 lines
586 B
Python
18 lines
586 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.forms import Widget
|
|
from django.forms.widgets import Input
|
|
|
|
from .base import WidgetTest
|
|
|
|
|
|
class WidgetTests(WidgetTest):
|
|
|
|
def test_value_omitted_from_data(self):
|
|
widget = Widget()
|
|
self.assertIs(widget.value_omitted_from_data({}, {}, 'field'), True)
|
|
self.assertIs(widget.value_omitted_from_data({'field': 'value'}, {}, 'field'), False)
|
|
|
|
def test_no_trailing_newline_in_attrs(self):
|
|
self.check_html(Input(), 'name', 'value', strict=True, html='<input type="None" name="name" value="value" />')
|