Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add tests mistakenly left out of r9397.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ad4e1a7a72136b5a6364b60ccf8a3e3ae387814a 1 parent d82aaef
@kmtracey kmtracey authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 tests/regressiontests/forms/fields.py
View
9 tests/regressiontests/forms/fields.py
@@ -431,6 +431,15 @@
>>> 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
Please sign in to comment.
Something went wrong with that request. Please try again.