Commit 40b6ba64 authored by Julien Muchembled's avatar Julien Muchembled

qa: do never import MySQL-specific code when testing SQLite

parent cf8f2028
...@@ -282,12 +282,14 @@ class ImporterTests(NEOThreadedTest): ...@@ -282,12 +282,14 @@ class ImporterTests(NEOThreadedTest):
tid_list.append(tid) tid_list.append(tid)
def fetchObject(orig, db, *args): def fetchObject(orig, db, *args):
if len(tid_list) == 5: if len(tid_list) == 5:
if isinstance(db, getAdapterKlass('MySQL')): x = type(db).__name__
if x == 'MySQLDatabaseManager':
from neo.tests.storage.testStorageMySQL import ServerGone from neo.tests.storage.testStorageMySQL import ServerGone
with ServerGone(db): with ServerGone(db):
orig(db, *args) orig(db, *args)
self.fail() self.fail()
else: else:
assert x == 'SQLiteDatabaseManager'
tid_list.append(None) tid_list.append(None)
p.revert() p.revert()
return orig(db, *args) return orig(db, *args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment