summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/backends/tests.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index 3191ef0c85..33c8763037 100644
--- a/tests/regressiontests/backends/tests.py
+++ b/tests/regressiontests/backends/tests.py
@@ -224,6 +224,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