test_sqlthread codestyle refactoring
This commit is contained in:
parent
5803410574
commit
ef0fd969ab
|
@ -36,6 +36,7 @@ class TestSqlBase(object): # pylint: disable=E1101, too-few-public-methods, E10
|
||||||
self.test_db.initialize_schema()
|
self.test_db.initialize_schema()
|
||||||
|
|
||||||
def get_table_schema(self, table_name):
|
def get_table_schema(self, table_name):
|
||||||
|
"""Get table list of column names and value types by table name"""
|
||||||
self.test_db.cur.execute("""PRAGMA table_info({})""".format(table_name))
|
self.test_db.cur.execute("""PRAGMA table_info({})""".format(table_name))
|
||||||
res = self.test_db.cur.fetchall()
|
res = self.test_db.cur.fetchall()
|
||||||
res = [[x[1], x[2]] for x in res]
|
res = [[x[1], x[2]] for x in res]
|
||||||
|
@ -216,6 +217,7 @@ class TestUpgradeBitmessageDB(TestSqlBase, unittest.TestCase): # pylint: disabl
|
||||||
self._setup_db()
|
self._setup_db()
|
||||||
self.test_db.cur.execute('''INSERT INTO settings VALUES('version','2')''')
|
self.test_db.cur.execute('''INSERT INTO settings VALUES('version','2')''')
|
||||||
|
|
||||||
|
|
||||||
def version(self):
|
def version(self):
|
||||||
"""
|
"""
|
||||||
Run SQL Scripts, Initialize DB with respect to versioning
|
Run SQL Scripts, Initialize DB with respect to versioning
|
||||||
|
|
Reference in New Issue
Block a user