diff options
| author | Ian Kelly <ian.g.kelly@gmail.com> | 2008-12-02 18:42:30 +0000 |
|---|---|---|
| committer | Ian Kelly <ian.g.kelly@gmail.com> | 2008-12-02 18:42:30 +0000 |
| commit | a261602bd3e9e2e76559ce4257bf32ce95b71d54 (patch) | |
| tree | e0d32424cf35480e28f5b3e04d7c7e8e0347471f /tests | |
| parent | 4c7efda28ff2e382efc92cdfc83cd8d9272c6a34 (diff) | |
[1.0.X] Fixed #9706: made SlugField honor max_length in Oracle, matching the other backends. Backport of [9548] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9549 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/model_fields/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regressiontests/model_fields/models.py b/tests/regressiontests/model_fields/models.py index a1c2bb0bc8..6948fe51a5 100644 --- a/tests/regressiontests/model_fields/models.py +++ b/tests/regressiontests/model_fields/models.py @@ -36,6 +36,9 @@ class Whiz(models.Model): class BigD(models.Model): d = models.DecimalField(max_digits=38, decimal_places=30) +class BigS(models.Model): + s = models.SlugField(max_length=255) + __test__ = {'API_TESTS':""" # Create a couple of Places. >>> f = Foo.objects.create(a='abc', d=decimal.Decimal("12.34")) @@ -88,4 +91,10 @@ u'' >>> bd = BigD.objects.get(pk=bd.pk) >>> bd.d == decimal.Decimal("12.9") True + +# Regression test for #9706: ensure SlugField honors max_length. +>>> bs = BigS.objects.create(s = 'slug' * 50) +>>> bs = BigS.objects.get(pk=bs.pk) +>>> bs.s == 'slug' * 50 +True """} |
