#NEWLINE# def test_doesnt_add_edit_mode_for_unauthenticated_user( self ) : #NEWLINE# #INDENT# self . user . is_authenticated = mock . MagicMock ( return_value = False ) #NEWLINE# mw = EditorMiddleware ( ) #NEWLINE# mw . process_request ( self . request ) #NEWLINE# self . assertFalse ( self . request . fp_edit_mode )