#NEWLINE# def test_redirects_to_login_when_not_authenticated( self ) : #NEWLINE# #INDENT# self . request . user . is_authenticated . return_value = False #NEWLINE# response = self . middleware . process_view ( ** self . kwargs ) #NEWLINE# self . assertEqual ( response . status_code , 302 )