James O'Beirne committed 7b2aacf

Set `check_same_thread` to False for sqlite.

This is to prevent ProgrammingErrors in ddbmock related to callbacks
that invoke objects created by the main thread.

Comments (0)

Files changed (1)


 # I know, using global "variable" for this kind of state *is* bad. But it helps
 # keeping execution times to a sane value. In particular, this allows to use
 # in-memory version of sqlite
-conn = sqlite3.connect(config.STORAGE_SQLITE_FILE)
+conn = sqlite3.connect(config.STORAGE_SQLITE_FILE, check_same_thread=False)
 class Store(object):
     def __init__(self, name):