summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Kelly <ian.g.kelly@gmail.com>2007-12-11 02:22:40 +0000
committerIan Kelly <ian.g.kelly@gmail.com>2007-12-11 02:22:40 +0000
commited5eca598e6e0fced2262dafa052d5db1661d83a (patch)
tree6f3d68801351664edb267cd3fe85c7f8d3354a8f /tests
parentf425cb8caabdd6af6d787c9f7e3f87f0856287ad (diff)
Fixed ORA-01461 error when trying to store more than 4000 bytes in a TextField under Oracle
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/model_regress/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/model_regress/models.py b/tests/regressiontests/model_regress/models.py
index 00c3bc96f0..02e73a5aa9 100644
--- a/tests/regressiontests/model_regress/models.py
+++ b/tests/regressiontests/model_regress/models.py
@@ -11,6 +11,7 @@ class Article(models.Model):
pub_date = models.DateTimeField()
status = models.IntegerField(blank=True, null=True, choices=CHOICES)
misc_data = models.CharField(max_length=100, blank=True)
+ article_text = models.TextField()
class Meta:
ordering = ('pub_date','headline')
@@ -41,5 +42,14 @@ Empty strings should be returned as Unicode
>>> a2 = Article.objects.get(pk=a.id)
>>> a2.misc_data
u''
+
+# TextFields can hold more than 4000 characters (this was broken in Oracle).
+>>> a3 = Article(headline="Really, really big", pub_date=datetime.now())
+>>> a3.article_text = "ABCDE" * 1000
+>>> a3.save()
+>>> a4 = Article.objects.get(pk=a3.id)
+>>> len(a4.article_text)
+5000
+
"""
}