#NEWLINE# def _view( self , keys , collection , resource ) : #NEWLINE# #INDENT# data = dict ( ( ( key , 'value' ) for key in keys ) ) #NEWLINE# data [ 'fake' ] = 'value' #NEWLINE# attr_info = attributes . RESOURCE_ATTRIBUTE_MAP [ collection ] #NEWLINE# controller = v2_base . Controller ( None , collection , resource , attr_info ) #NEWLINE# res = controller . _view ( context . get_admin_context ( ) , data ) #NEWLINE# self . assertNotIn ( 'fake' , res ) #NEWLINE# for key in keys : #NEWLINE# #INDENT# self . assertIn ( key , res )