#NEWLINE# def testApprovePermissions( self ) : #NEWLINE# #INDENT# "The delete view should only be accessible to 'moderators'" #NEWLINE# self . createSomeComments ( ) #NEWLINE# self . client . login ( username = 'normaluser' , password = 'normaluser' ) #NEWLINE# response = self . client . get ( '/approve/1/' ) #NEWLINE# self . assertEqual ( self [ 'Location' ] , 'http://testserver/accounts/login/?next=/approve/1/' ) #NEWLINE# makeModerator ( 'normaluser' ) #NEWLINE# response = self . client . get ( '/approve/1/' ) #NEWLINE# self . assertEqual ( response . status_code , 200 )