1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[soc2009/model-validation] Merged to trunk at r11365

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Honza Král
2009-08-05 01:27:15 +00:00
parent 37ce9a5035
commit 97db2014f8
125 changed files with 21597 additions and 10515 deletions

View File

@@ -17,6 +17,21 @@ class Callproc(unittest.TestCase):
return True
else:
return True
class LongString(unittest.TestCase):
def test_long_string(self):
# If the backend is Oracle, test that we can save a text longer
# than 4000 chars and read it properly
if settings.DATABASE_ENGINE == 'oracle':
c = connection.cursor()
c.execute('CREATE TABLE ltext ("TEXT" NCLOB)')
long_str = ''.join([unicode(x) for x in xrange(4000)])
c.execute('INSERT INTO ltext VALUES (%s)',[long_str])
c.execute('SELECT text FROM ltext')
row = c.fetchone()
c.execute('DROP TABLE ltext')
self.assertEquals(long_str, row[0].read())
def connection_created_test(sender, **kwargs):
print 'connection_created signal'