Add tests mistakenly left out of r9397.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2008-11-10 20:01:51 +00:00
parent d82aaef844
commit ad4e1a7a72
1 changed files with 9 additions and 0 deletions

View File

@ -431,6 +431,15 @@ ValidationError: [u'Ensure that there are no more than 3 digits in total.']
>>> f.clean('.002') == Decimal("0.002")
True
>>> f = DecimalField(max_digits=2, decimal_places=2)
>>> f.clean('.01') == Decimal(".01")
True
>>> f.clean('1.1')
Traceback (most recent call last):
...
ValidationError: [u'Ensure that there are no more than 0 digits before the decimal point.']
# DateField ###################################################################
>>> import datetime