#NEWLINE# def post( self , user ) : #NEWLINE# #INDENT# self . data = { #NEWLINE# #INDENT# 'name' : 'New name' , #NEWLINE# 'description' : 'Description' , #NEWLINE# #UNINDENT# } #NEWLINE# view = UserGroupSettings . as_view ( ) #NEWLINE# url = reverse ( 'admin:usergroup_settings' , kwargs = { #NEWLINE# #INDENT# 'project_id' : self . project . id , #NEWLINE# 'usergroup_id' : self . usergroup . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# request = self . factory . post ( url , self . data ) #NEWLINE# request . user = user #NEWLINE# setattr ( request , 'session' , 'session' ) #NEWLINE# messages = FallbackStorage ( request ) #NEWLINE# setattr ( request , '_messages' , messages ) #NEWLINE# return view ( request , project_id = self . project . id , usergroup_id = self . usergroup . id ) . render ( )