diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-17 14:05:43 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-17 14:05:43 +0000 |
| commit | 50ecd7537909915bc5faed644817a58c0a1f765e (patch) | |
| tree | 2d23f87a773d65c14fda036294fb680e2d37ca09 /tests | |
| parent | 30bdabb2b0d01e1f89af18028ab1605db734bd4b (diff) | |
Fixed #6492 -- Added bullet-proofing to isValidFloat validator. Thanks, Bastian Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7258 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/manipulators/models.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/modeltests/manipulators/models.py b/tests/modeltests/manipulators/models.py index 2ee81f62b3..c9b9848235 100644 --- a/tests/modeltests/manipulators/models.py +++ b/tests/modeltests/manipulators/models.py @@ -1,3 +1,4 @@ +# coding: utf-8 """ 27. Default manipulators @@ -21,7 +22,7 @@ class Album(models.Model): def __unicode__(self): return self.name -__test__ = {'API_TESTS':""" +__test__ = {'API_TESTS':u""" >>> from django.utils.datastructures import MultiValueDict # Create a Musician object via the default AddManipulator. @@ -88,4 +89,9 @@ True <Album: Ultimate Ella> >>> a2.release_date datetime.date(2005, 2, 13) + +# Test isValidFloat Unicode coercion +>>> from django.core.validators import isValidFloat, ValidationError +>>> try: isValidFloat(u"รค", None) +... except ValidationError: pass """} |
