diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 8344bad..2de2818 100644
a
|
b
|
class DatabaseWrapper(BaseDatabaseWrapper):
|
220 | 220 | if self.settings_dict['NAME'] != ":memory:": |
221 | 221 | BaseDatabaseWrapper.close(self) |
222 | 222 | |
223 | | FORMAT_QMARK_REGEX = re.compile(r'(?![^%])%s') |
| 223 | FORMAT_QMARK_REGEX = re.compile(r'(?<!%)%s') |
224 | 224 | |
225 | 225 | class SQLiteCursorWrapper(Database.Cursor): |
226 | 226 | """ |
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index efa3e0c..f94f5c1 100644
a
|
b
|
class ConnectionCreatedSignalTest(TestCase):
|
194 | 194 | self.assertTrue(data == {}) |
195 | 195 | |
196 | 196 | |
| 197 | class EscapingChecks(TestCase): |
| 198 | |
| 199 | @unittest.skipUnless(connection.vendor == 'sqlite', |
| 200 | "This is a sqlite-specific issue") |
| 201 | def test_parameter_escaping(self): |
| 202 | #13648: '%s' escaping support for sqlite3 |
| 203 | cursor = connection.cursor() |
| 204 | response = cursor.execute( |
| 205 | "select strftime('%%s', date('now'))").fetchall()[0][0] |
| 206 | self.assertNotEqual(response, None) |
| 207 | |
| 208 | |
197 | 209 | class BackendTestCase(TestCase): |
198 | 210 | def test_cursor_executemany(self): |
199 | 211 | #4896: Test cursor.executemany |