#NEWLINE# def test_update_with_valid_values( self ) : #NEWLINE# #INDENT# customer = Customer . create ( ) . customer #NEWLINE# address = Address . create ( { #NEWLINE# #INDENT# 'customer_id' : customer . id , #NEWLINE# 'street_address' : '1811 E Main St' , #NEWLINE# 'extended_address' : 'Suite 200' , #NEWLINE# 'locality' : 'Chicago' , #NEWLINE# 'region' : 'Illinois' , #NEWLINE# 'postal_code' : '60622' , #NEWLINE# 'country_name' : 'United States of America' , #NEWLINE# #UNINDENT# } ) . address #NEWLINE# result = Address . update ( customer . id , address . id , { #NEWLINE# #INDENT# 'street_address' : '123 E New St' , #NEWLINE# 'extended_address' : 'New Suite 3' , #NEWLINE# 'locality' : 'Chicago' , #NEWLINE# 'region' : 'Illinois' , #NEWLINE# 'postal_code' : '60621' , #NEWLINE# 'country_code_alpha2' : 'MX' , #NEWLINE# 'country_code_alpha3' : 'MEX' , #NEWLINE# 'country_code_numeric' : '484' , #NEWLINE# 'country_name' : 'Mexico' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( result . is_success ) #NEWLINE# address = result . address #NEWLINE# self . assertEquals ( customer . id , address . customer_id ) #NEWLINE# self . assertEquals ( '123 E New St' , address . street_address ) #NEWLINE# self . assertEquals ( 'New Suite 3' , address . extended_address ) #NEWLINE# self . assertEquals ( 'Chicago' , address . locality ) #NEWLINE# self . assertEquals ( 'Illinois' , address . region ) #NEWLINE# self . assertEquals ( '60621' , address . postal_code ) #NEWLINE# self . assertEquals ( 'MX' , address . country_code_alpha2 ) #NEWLINE# self . assertEquals ( 'MEX' , address . country_code_alpha3 ) #NEWLINE# self . assertEquals ( '484' , address . country_code_numeric ) #NEWLINE# self . assertEquals ( 'Mexico' , address . country_name )