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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user