#NEWLINE# def test_getitem( self ) : #NEWLINE# #INDENT# '\n        Using Form as a mapping will yield the value of fields keyed by name.\n        ' #NEWLINE# fields = [ data_form . Field ( var = 'botname' , value = 'The Jabber Bot' ) , data_form . Field ( 'boolean' , var = 'public' , value = True ) , data_form . Field ( 'list-multi' , var = 'features' , values = [ 'news' , 'search' ] ) ] #NEWLINE# form = data_form . Form ( 'submit' , fields = fields ) #NEWLINE# self . assertEqual ( 'The Jabber Bot' , form [ 'botname' ] ) #NEWLINE# self . assertTrue ( form [ 'public' ] ) #NEWLINE# self . assertEqual ( [ 'news' , 'search' ] , form [ 'features' ] )