test_sqlthread codestyle refactoring

This commit is contained in:
shportix 2023-09-16 01:48:35 +03:00
parent dfde50633e
commit 88f56b50e6
No known key found for this signature in database
GPG Key ID: 2594F3870220CC1E

View File

@ -282,8 +282,8 @@ class TestUpgradeBitmessageDB(TestSqlBase, unittest.TestCase): # pylint: disabl
answer = (check_column in inventory_schema)
# check deleting first20bytesofencryptedmessage column to inventory table
self.assertNotEqual(answer, True, "Column first20bytesofencryptedmessage in table inventory not "\
"deleted in version 3")
self.assertNotEqual(answer, True,
"Column first20bytesofencryptedmessage in table inventory not deleted in version 3")
# check deleting inventory_backup table
self.test_db.cur.execute(''' SELECT count(name) FROM sqlite_master
@ -336,7 +336,8 @@ class TestUpgradeBitmessageDB(TestSqlBase, unittest.TestCase): # pylint: disabl
self.assertEqual(version, 6, "Settings version value not updated")
# check deleting knownnodes table
self.test_db.cur.execute(''' SELECT count(name) FROM sqlite_master WHERE type='table' AND name='knownnodes' ''')
self.test_db.cur.execute(''' SELECT count(name) FROM sqlite_master
WHERE type='table' AND name='knownnodes' ''')
res = self.test_db.cur.fetchall()[0][0]
self.assertNotEqual(res, 1, "Table knownnodes not deleted in versioning 6")