#NEWLINE# def test_post_creates_record( self ) : #NEWLINE# #INDENT# 'Test that a POST request generates a new Unsubscribe record' #NEWLINE# self . assertFalse ( Unsubscribe . objects . filter ( address = self . email , source = 'user' ) . exists ( ) ) #NEWLINE# request = self . factory . post ( '/' ) #NEWLINE# request . GET = { #NEWLINE# #INDENT# 'email' : self . email , #NEWLINE# 'code' : self . code , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . view ( request ) #NEWLINE# self . assertTrue ( Unsubscribe . objects . filter ( address = self . email , source = 'user' ) . exists ( ) ) #NEWLINE# self . assertEqual ( response . status_code , 302 )