#NEWLINE# def test_should_not_allow_duplicate_invitation( self ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'email' : self . invited_user_email , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( self . view_url , data , follow = True ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# response = self . client . post ( self . view_url , data , follow = True ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# form = response . context_data [ 'form' ] #NEWLINE# self . assertEqual ( len ( form . errors ) , 1 )