#NEWLINE# @ override_settings ( LFS_AUTO_UPDATE_DEFAULT_ADDRESSES = False ) #NEWLINE# def test_address_changed_on_checkout( self ) : #NEWLINE# #INDENT# logged_in = self . client . login ( username = self . username , password = self . password ) #NEWLINE# self . assertEqual ( logged_in , True ) #NEWLINE# self . assertEquals ( Address . objects . count ( ) , 4 ) #NEWLINE# cart_response = self . client . get ( reverse ( 'lfs_cart' ) ) #NEWLINE# self . assertContains ( cart_response , self . PRODUCT1_NAME , status_code = 200 ) #NEWLINE# checkout_response = self . client . get ( reverse ( 'lfs_checkout' ) ) #NEWLINE# checkout_data = { #NEWLINE# #INDENT# 'invoice-firstname' : 'bob' , #NEWLINE# 'invoice-lastname' : 'builder' , #NEWLINE# 'invoice-line1' : 'de company' , #NEWLINE# 'invoice-line2' : 'de street' , #NEWLINE# 'invoice-city' : 'de area' , #NEWLINE# 'invoice-state' : 'de town' , #NEWLINE# 'invoice-code' : '12345' , #NEWLINE# 'invoice-country' : 'DE' , #NEWLINE# 'invoice-email' : 'a@a.com' , #NEWLINE# 'invoice-phone' : '1234567' , #NEWLINE# 'shipping-firstname' : 'hans' , #NEWLINE# 'shipping-lastname' : 'schmidt' , #NEWLINE# 'shipping-line1' : 'orianenberger strasse' , #NEWLINE# 'shipping-line2' : 'de town' , #NEWLINE# 'shipping-city' : 'stuff' , #NEWLINE# 'shipping-state' : 'BE' , #NEWLINE# 'shipping-code' : '12345' , #NEWLINE# 'shipping-country' : 'DE' , #NEWLINE# 'shipping-email' : 'b@b.com' , #NEWLINE# 'shipping-phone' : '7654321' , #NEWLINE# 'payment_method' : self . by_invoice . id , #NEWLINE# #UNINDENT# } #NEWLINE# checkout_post_response = self . client . post ( reverse ( 'lfs_checkout' ) , checkout_data ) #NEWLINE# self . assertRedirects ( self , reverse ( 'lfs_thank_you' ) , status_code = 302 , target_status_code = 200 ) #NEWLINE# self . assertEquals ( Address . objects . count ( ) , 6 )