#NEWLINE# def test_add_rule_post_with_error( self ) : #NEWLINE# #INDENT# rule1 = self . fw_rules . first ( ) #NEWLINE# form_data = { #NEWLINE# #INDENT# 'name' : rule1 . name , #NEWLINE# 'description' : rule1 . description , #NEWLINE# 'protocol' : 'abc' , #NEWLINE# 'action' : 'pass' , #NEWLINE# 'source_ip_address' : rule1 . source_ip_address , #NEWLINE# 'source_port' : rule1 . source_port , #NEWLINE# 'destination_ip_address' : rule1 . destination_ip_address , #NEWLINE# 'destination_port' : rule1 . destination_port , #NEWLINE# 'shared' : rule1 . shared , #NEWLINE# 'enabled' : rule1 . enabled , #NEWLINE# #UNINDENT# } #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# res = self . client . post ( reverse ( self . ADDRULE_PATH ) , self ) #NEWLINE# self . assertFormErrors ( res , 2 )