#NEWLINE# def test_get_context_data_with_contributor( self ) : #NEWLINE# #INDENT# 'Test GET with contributor.' #NEWLINE# dashboard_view = Dashboard ( ) #NEWLINE# url = reverse ( 'admin:dashboard' ) #NEWLINE# request = APIRequestFactory ( ) . get ( url ) #NEWLINE# request . user = context . contributor #NEWLINE# dashboard_view . request = request #NEWLINE# context = dashboard_view . get_context_data ( ) #NEWLINE# self . assertEqual ( len ( context . get ( 'projects' ) ) , 1 )