diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2008-11-10 20:01:51 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2008-11-10 20:01:51 +0000 |
| commit | ad4e1a7a72136b5a6364b60ccf8a3e3ae387814a (patch) | |
| tree | 3fdde72a4b9cfd026a63a1296bddebb6202bbcf0 /tests/regressiontests | |
| parent | d82aaef8446c4188a27ba4347b75f0dffaa42f0a (diff) | |
Add tests mistakenly left out of r9397.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/forms/fields.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/fields.py b/tests/regressiontests/forms/fields.py index 1b5d7a3b68..fa5a62ac51 100644 --- a/tests/regressiontests/forms/fields.py +++ b/tests/regressiontests/forms/fields.py @@ -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 |
