summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorShai Berger <shai@platonix.com>2014-05-16 20:04:26 +0300
committerShai Berger <shai@platonix.com>2014-05-17 01:16:06 +0300
commitb7a67b788cf2fa59a84f933492413379eb3cab83 (patch)
tree3cb05a98761fb27e5e647558184059d0e1ab3edb /tests
parent8c5fbcf50aecec8ecfb802694af4dd7e0c9d666f (diff)
[1.7.x] Fixed storing of binary fields and unicode textfields for Oracle/Python3
Backport of 6bb6df2943 from master
Diffstat (limited to 'tests')
-rw-r--r--tests/model_regress/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/model_regress/tests.py b/tests/model_regress/tests.py
index 952ba45aab..057798c785 100644
--- a/tests/model_regress/tests.py
+++ b/tests/model_regress/tests.py
@@ -66,6 +66,17 @@ class ModelTests(TestCase):
a = Article.objects.get(pk=a.pk)
self.assertEqual(len(a.article_text), 5000)
+ def test_long_unicode_textfield(self):
+ # TextFields can hold more than 4000 bytes also when they are
+ # less than 4000 characters
+ a = Article.objects.create(
+ headline="Really, really big",
+ pub_date=datetime.datetime.now(),
+ article_text='\u05d0\u05d1\u05d2' * 1000
+ )
+ a = Article.objects.get(pk=a.pk)
+ self.assertEqual(len(a.article_text), 3000)
+
def test_date_lookup(self):
# Regression test for #659
Party.objects.create(when=datetime.datetime(1999, 12, 31))