#NEWLINE# def test_constructor_defaults( self ) : #NEWLINE# #INDENT# import six #NEWLINE# import threading #NEWLINE# from gcloud.bigtable.happybase.connection import Connection #NEWLINE# size = 11 #NEWLINE# cluster_copy = _Cluster ( ) #NEWLINE# all_copies = ( [ cluster_copy ] * size ) #NEWLINE# cluster = _Cluster ( copies = all_copies ) #NEWLINE# pool = self . _makeOne ( size , cluster = cluster ) #NEWLINE# self . assertTrue ( isinstance ( pool . _lock , type ( threading . Lock ( ) ) ) ) #NEWLINE# self . assertTrue ( isinstance ( pool . _thread_connections , threading . local ) ) #NEWLINE# self . assertEqual ( cluster_copy . _thread_connections . __dict__ , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# queue = pool . _queue #NEWLINE# self . assertTrue ( isinstance ( queue , six . moves . queue . LifoQueue ) ) #NEWLINE# self . assertTrue ( queue . full ( ) ) #NEWLINE# self . assertEqual ( queue . maxsize , size ) #NEWLINE# for connection in queue . queue : #NEWLINE# #INDENT# self . assertTrue ( isinstance ( connection , Connection ) ) #NEWLINE# self . assertTrue ( ( connection . _cluster is cluster_copy ) )