#NEWLINE# def test_getbool__with_known_param_and_valid_text( self ) : #NEWLINE# #INDENT# for true_text in [ 'true' , 'TRUE' , 'True' , 'yes' , 'on' , '1' ] : #NEWLINE# #INDENT# userdata = UserData ( param = true_text ) #NEWLINE# value = userdata . getbool ( 'param' ) #NEWLINE# assert isinstance ( value , bool ) , ( 'text=%s' % true_text ) #NEWLINE# self . assertEqual ( value , True ) #NEWLINE# #UNINDENT# for false_text in [ 'false' , 'FALSE' , 'False' , 'no' , 'off' , '0' ] : #NEWLINE# #INDENT# userdata = UserData ( param = self ) #NEWLINE# value = userdata . getbool ( 'param' ) #NEWLINE# assert isinstance ( value , bool ) , ( 'text=%s' % false_text ) #NEWLINE# self . assertEqual ( value , False )