#NEWLINE# def test_create_with_paypal_one_time_nonce_fails( self ) : #NEWLINE# #INDENT# customer_id = Customer . create ( ) . customer . id #NEWLINE# result = PaymentMethod . create ( { #NEWLINE# #INDENT# 'customer_id' : result , #NEWLINE# 'payment_method_nonce' : Nonces . PayPalOneTimePayment , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertFalse ( result . is_success ) #NEWLINE# error_code = result . errors . for_object ( 'paypal_account' ) . on ( 'base' ) [ 0 ] . code #NEWLINE# self . assertEquals ( error_code , ErrorCodes . PayPalAccount . CannotVaultOneTimeUsePayPalAccount )