#NEWLINE# def testKeyValue( self ) : #NEWLINE# #INDENT# 'Tests retrieving row value that corresponds to the key.' #NEWLINE# self . clitable . _TemplateNamesToFiles = ( lambda t : [ self . template_file ] ) #NEWLINE# self . clitable . ParseCmd ( self . input_data , attributes = { #NEWLINE# #INDENT# 'Command' : 'sh ver' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . failUnlessEqual ( self . clitable . KeyValue ( ) , [ 'a' ] ) #NEWLINE# self . clitable . row_index = 2 #NEWLINE# self . failUnlessEqual ( self . clitable . KeyValue ( ) , [ 'd' ] ) #NEWLINE# self . clitable . row_index = 1 #NEWLINE# self . clitable . AddKeys ( [ 'Col3' ] ) #NEWLINE# self . failUnlessEqual ( self . clitable . KeyValue ( ) , [ 'a' , 'c' ] ) #NEWLINE# self . clitable . _keys = set ( ) #NEWLINE# for ( rownum , row ) in enumerate ( self . clitable , start = 1 ) : #NEWLINE# #INDENT# self . failUnlessEqual ( row . table . KeyValue ( ) , [ ( '%s' % row ) ] )