mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fix storing of binary fields and unicode textfields for Oracle/Python3
This commit is contained in:
parent
2e364a0aac
commit
6bb6df2943
2 changed files with 19 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue