mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.3.X] Fixed #13648 - '%s' escaping support for sqlite3 regression.
Thanks to master for the report and initial patch, and salgado and others for work on the patch. Backport of [16209] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -194,6 +194,20 @@ class ConnectionCreatedSignalTest(TestCase):
|
||||
self.assertTrue(data == {})
|
||||
|
||||
|
||||
class EscapingChecks(TestCase):
|
||||
|
||||
@unittest.skipUnless(connection.vendor == 'sqlite',
|
||||
"This is a sqlite-specific issue")
|
||||
def test_parameter_escaping(self):
|
||||
#13648: '%s' escaping support for sqlite3
|
||||
cursor = connection.cursor()
|
||||
response = cursor.execute(
|
||||
"select strftime('%%s', date('now'))").fetchall()[0][0]
|
||||
self.assertNotEqual(response, None)
|
||||
# response should be an non-zero integer
|
||||
self.assertTrue(int(response))
|
||||
|
||||
|
||||
class BackendTestCase(TestCase):
|
||||
def test_cursor_executemany(self):
|
||||
#4896: Test cursor.executemany
|
||||
|
||||
Reference in New Issue
Block a user