1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[soc2009/model-valition] Merged to trunk at r10914

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@10916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Honza Král
2009-06-03 14:03:10 +00:00
parent 85e0c469aa
commit 7b14625d0d
24 changed files with 1308 additions and 477 deletions

View File

@@ -6,13 +6,26 @@ from django import forms
from django.db import models
from django.core.exceptions import ValidationError
from models import Foo, Bar, Whiz, BigD, BigS
from models import Foo, Bar, Whiz, BigD, BigS, Image
try:
from decimal import Decimal
except ImportError:
from django.utils._decimal import Decimal
# If PIL available, do these tests.
if Image:
from imagefield import \
ImageFieldTests, \
ImageFieldTwoDimensionsTests, \
ImageFieldNoDimensionsTests, \
ImageFieldOneDimensionTests, \
ImageFieldDimensionsFirstTests, \
ImageFieldUsingFileTests, \
TwoImageFieldTests
class DecimalFieldTests(django.test.TestCase):
def test_to_python(self):
f = models.DecimalField(max_digits=4, decimal_places=2)