Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit c04de46b3cda62fe574bd70c32f675960b0bd083 1 parent d121e4a
@brosner brosner authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/regressiontests/forms/widgets.py
View
5 tests/regressiontests/forms/widgets.py
@@ -999,6 +999,11 @@
>>> 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" />'
+>>> 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 ###############################################################
>>> w = DateTimeInput()

0 comments on commit c04de46

Please sign in to comment.
Something went wrong with that request. Please try again.