#NEWLINE# def test_company( self ) : #NEWLINE# #INDENT# contact = Contact . objects . create ( ) #NEWLINE# data = { #NEWLINE# #INDENT# 'email' : 'company@satchmoproject.com' , #NEWLINE# 'first_name' : 'Test' , #NEWLINE# 'last_name' : 'Company' , #NEWLINE# 'phone' : '123-111-4411' , #NEWLINE# 'street1' : '56 Cool Lane' , #NEWLINE# 'city' : 'Niftyville' , #NEWLINE# 'state' : 'IA' , #NEWLINE# 'postal_code' : '12344' , #NEWLINE# 'country' : 231 , #NEWLINE# 'ship_addressee' : 'Test Company' , #NEWLINE# 'ship_street1' : '56 Industry Way' , #NEWLINE# 'ship_city' : 'Niftytown' , #NEWLINE# 'ship_state' : 'IA' , #NEWLINE# 'ship_postal_code' : '12366' , #NEWLINE# 'ship_country' : 231 , #NEWLINE# 'organization' : 'Testers Anonymous' , #NEWLINE# #UNINDENT# } #NEWLINE# shop = Config . objects . get_current ( ) #NEWLINE# form = ContactInfoForm ( data = data , shop = shop , contact = contact ) #NEWLINE# self . assertEqual ( True , form . is_valid ( ) ) #NEWLINE# contactid = form . save ( contact = contact ) #NEWLINE# self . assertEqual ( contact . id , contactid ) #NEWLINE# self . assert_ ( contact . organization ) #NEWLINE# self . assertEqual ( contact . organization . name , 'Testers Anonymous' )