#NEWLINE# def test_all( self ) : #NEWLINE# #INDENT# request = HttpRequest ( ) #NEWLINE# request . user = self . user #NEWLINE# request . user . user_permissions . add ( self . add ) #NEWLINE# request . user . user_permissions . add ( self . change ) #NEWLINE# request . user . user_permissions . add ( self . delete ) #NEWLINE# resource = DjangoNoteResource ( ) #NEWLINE# auth = resource . _meta . authorization #NEWLINE# bundle = resource . build_bundle ( request = request ) #NEWLINE# bundle . request . method = 'GET' #NEWLINE# self . assertEqual ( len ( auth . read_list ( resource . get_object_list ( bundle . request ) , bundle ) ) , 4 ) #NEWLINE# self . assertTrue ( auth . read_detail ( resource . get_object_list ( bundle . request ) [ 0 ] , bundle ) ) #NEWLINE# bundle . request . method = 'POST' #NEWLINE# self . assertEqual ( len ( auth . create_list ( resource . get_object_list ( bundle . request ) , bundle ) ) , 4 ) #NEWLINE# self . assertTrue ( auth . create_detail ( resource . get_object_list ( bundle . request ) [ 0 ] , bundle ) ) #NEWLINE# bundle . request . method = 'PUT' #NEWLINE# self . assertEqual ( len ( auth . update_list ( resource . get_object_list ( bundle . request ) , bundle ) ) , 4 ) #NEWLINE# self . assertTrue ( auth . update_detail ( resource . get_object_list ( bundle . request ) [ 0 ] , bundle ) ) #NEWLINE# bundle . request . method = 'DELETE' #NEWLINE# self . assertEqual ( len ( auth . delete_list ( resource . get_object_list ( bundle . request ) , bundle ) ) , 4 ) #NEWLINE# self . assertTrue ( auth . delete_detail ( resource . get_object_list ( bundle . request ) [ 0 ] , bundle ) )