mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
newforms-admin: Added some tests for SplitDateTimeWidget._has_changed.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d121e4a446
commit
c04de46b3c
@ -999,6 +999,11 @@ included on both widgets.
|
|||||||
>>> w.render('date', datetime.datetime(2006, 1, 10, 7, 30))
|
>>> w.render('date', datetime.datetime(2006, 1, 10, 7, 30))
|
||||||
u'<input type="text" class="pretty" value="2006-01-10" name="date_0" /><input type="text" class="pretty" value="07:30:00" name="date_1" />'
|
u'<input type="text" class="pretty" value="2006-01-10" name="date_0" /><input type="text" class="pretty" value="07:30:00" name="date_1" />'
|
||||||
|
|
||||||
|
>>> w._has_changed(datetime.datetime(2008, 5, 5, 12, 40, 00), [u'2008-05-05', u'12:40:00'])
|
||||||
|
False
|
||||||
|
>>> w._has_changed(datetime.datetime(2008, 5, 5, 12, 40, 00), [u'2008-05-05', u'12:41:00'])
|
||||||
|
True
|
||||||
|
|
||||||
# DateTimeInput ###############################################################
|
# DateTimeInput ###############################################################
|
||||||
|
|
||||||
>>> w = DateTimeInput()
|
>>> w = DateTimeInput()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user