#NEWLINE# def test_redirect_to_restricted_page_after_successful_login( self ) : #NEWLINE# #INDENT# user = auth . UserF ( is_active = True ) #NEWLINE# perm = _makePermission ( perm = 'list_journal' , model = 'journal' ) #NEWLINE# user . user_permissions . add ( perm ) #NEWLINE# collection = modelfactories . CollectionFactory . create ( ) #NEWLINE# collection . add_user ( user ) #NEWLINE# collection . make_default_to_user ( user ) #NEWLINE# page = self . app . get ( reverse ( 'journal.index' ) , user = user ) #NEWLINE# page . mustcontain ( 'no items' )