#NEWLINE# @ utils . accounts_wide #NEWLINE# def test_update_account( self ) : #NEWLINE# #INDENT# account = self . _import ( ) #NEWLINE# try : #NEWLINE# #INDENT# account_id = account . id #NEWLINE# account . token = 'test2' #NEWLINE# expiry = ( datetime . utcnow ( ) + timedelta ( hours = 1 ) ) . replace ( tzinfo = pytz . utc ) #NEWLINE# account . token_expiry = e #NEWLINE# account . save ( ) #NEWLINE# self . assertEqual ( account . id , account_id ) #NEWLINE# self . assertEqual ( account . token_expiry , expiry ) #NEWLINE# account = sdk . Account . retrieve ( id = account . id ) #NEWLINE# self . assertEqual ( account . id , account_id ) #NEWLINE# self . assertEqual ( account . token_expiry , expiry ) #NEWLINE# account . service = 'invalid' #NEWLINE# with self . assertRaises ( kexceptions . APIException ) as e : #NEWLINE# #INDENT# account . save ( ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# account . delete ( )