def _create_post_request(rf, directory, user, url='/', data=None):
 if (data is None):
  data = {}
 request = rf.post(url, data=data)
 request.user = user
 request.permissions = get_matching_permissions(request.user, directory)
 return request

def _create_post_request ( rf , directory , user , url = '/' , data = None ) : if ( data is None ) : data = { } request = rf . post ( url , data = data ) request . user = user request . permissions = get_matching_permissions ( request . user , directory ) return request
convenience function to create and setup fake post requests .