changes to check root cause

This commit is contained in:
Muzahid 2021-06-21 22:15:30 +05:30
parent feac7a4c05
commit adb6521fb7
Signed by untrusted user: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA
2 changed files with 27 additions and 27 deletions

View File

@ -3,9 +3,9 @@ Test for network group
""" """
import unittest import unittest
from .common import skip_python3 # from .common import skip_python3
skip_python3() # skip_python3()
class TestNetworkGroup(unittest.TestCase): class TestNetworkGroup(unittest.TestCase):

View File

@ -17,28 +17,28 @@ from pybitmessage.class_sqlThread import sqlThread # noqa:E402
from pybitmessage.addresses import encodeAddress # noqa:E402 from pybitmessage.addresses import encodeAddress # noqa:E402
class TestSqlThread(unittest.TestCase): # class TestSqlThread(unittest.TestCase):
"""Test case for SQL thread""" # """Test case for SQL thread"""
#
@classmethod # @classmethod
def setUpClass(cls): # def setUpClass(cls):
# Start SQL thread # # Start SQL thread
sqlLookup = sqlThread() # sqlLookup = sqlThread()
sqlLookup.daemon = True # sqlLookup.daemon = True
sqlLookup.start() # sqlLookup.start()
sql_ready.wait() # sql_ready.wait()
#
@classmethod # @classmethod
def tearDownClass(cls): # def tearDownClass(cls):
sqlStoredProcedure('exit') # sqlStoredProcedure('exit')
for thread in threading.enumerate(): # for thread in threading.enumerate():
if thread.name == "SQL": # if thread.name == "SQL":
thread.join() # thread.join()
#
def test_create_function(self): # def test_create_function(self):
"""Check the result of enaddr function""" # """Check the result of enaddr function"""
encoded_str = encodeAddress(4, 1, "21122112211221122112") # encoded_str = encodeAddress(4, 1, "21122112211221122112")
#
query = sqlQuery('SELECT enaddr(4, 1, "21122112211221122112")') # query = sqlQuery('SELECT enaddr(4, 1, "21122112211221122112")')
self.assertEqual( # self.assertEqual(
query[0][-1], encoded_str, "test case fail for create_function") # query[0][-1], encoded_str, "test case fail for create_function")