#NEWLINE# def test( self ) : #NEWLINE# #INDENT# project = ProjectFactory . create ( ) #NEWLINE# UserGroupFactory . create_batch ( 3 , ** { #NEWLINE# #INDENT# 'project' : project , #NEWLINE# #UNINDENT# } ) #NEWLINE# view = UserGroupList ( ) #NEWLINE# url = reverse ( 'admin:usergroup_list' , kwargs = { #NEWLINE# #INDENT# 'project_id' : project . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# request = APIRequestFactory ( ) . get ( url , project_id = view . id ) #NEWLINE# request . user = project . creator #NEWLINE# view . request = request #NEWLINE# context = view . get_context_data ( project . id ) #NEWLINE# self . assertEqual ( context . get ( 'project' ) , project )