Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.

If 'name' contained non-ASCII characters, the comparison raised a
UnicodeEncodeError on Python 2.
This commit is contained in:
Tim Graham 2015-02-14 20:46:11 -05:00
parent 81a94cc616
commit 63c5c98701
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
self.cursor().execute("BEGIN")
def is_in_memory_db(self, name):
return name == ":memory:" or "mode=memory" in name
return name == ":memory:" or "mode=memory" in force_text(name)
FORMAT_QMARK_REGEX = re.compile(r'(?<!%)%s')