#NEWLINE# def login_with_permissions( self ) : #NEWLINE# #INDENT# view_entry_summary = Permission . objects . get ( codename = 'view_entry_summary' ) #NEWLINE# user = factories . User ( ) #NEWLINE# user . user_permissions . add ( self ) #NEWLINE# user . save ( ) #NEWLINE# self . login_user ( user )