mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
newforms-admin: Added a newline between expected output and comments to let the tests pass again.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f793f27df0
commit
d121e4a446
@ -963,15 +963,19 @@ u'<input id="foo_0" type="text" class="big" value="john" name="name_0" /><br /><
|
|||||||
u'<input id="bar_0" type="text" class="big" value="john" name="name_0" /><br /><input id="bar_1" type="text" class="small" value="lennon" name="name_1" />'
|
u'<input id="bar_0" type="text" class="big" value="john" name="name_0" /><br /><input id="bar_1" type="text" class="small" value="lennon" name="name_1" />'
|
||||||
|
|
||||||
>>> w = MyMultiWidget(widgets=(TextInput(), TextInput()))
|
>>> w = MyMultiWidget(widgets=(TextInput(), TextInput()))
|
||||||
|
|
||||||
# test with no initial data
|
# test with no initial data
|
||||||
>>> w._has_changed(None, [u'john', u'lennon'])
|
>>> w._has_changed(None, [u'john', u'lennon'])
|
||||||
True
|
True
|
||||||
|
|
||||||
# test when the data is the same as initial
|
# test when the data is the same as initial
|
||||||
>>> w._has_changed(u'john__lennon', [u'john', u'lennon'])
|
>>> w._has_changed(u'john__lennon', [u'john', u'lennon'])
|
||||||
False
|
False
|
||||||
|
|
||||||
# test when the first widget's data has changed
|
# test when the first widget's data has changed
|
||||||
>>> w._has_changed(u'john__lennon', [u'alfred', u'lennon'])
|
>>> w._has_changed(u'john__lennon', [u'alfred', u'lennon'])
|
||||||
True
|
True
|
||||||
|
|
||||||
# test when the last widget's data has changed. this ensures that it is not
|
# test when the last widget's data has changed. this ensures that it is not
|
||||||
# short circuiting while testing the widgets.
|
# short circuiting while testing the widgets.
|
||||||
>>> w._has_changed(u'john__lennon', [u'john', u'denver'])
|
>>> w._has_changed(u'john__lennon', [u'john', u'denver'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user