diff options
Diffstat (limited to 'tests/regressiontests')
| -rw-r--r-- | tests/regressiontests/backends/tests.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py index 81dcfde30d..aff27369ad 100644 --- a/tests/regressiontests/backends/tests.py +++ b/tests/regressiontests/backends/tests.py @@ -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' |
