#NEWLINE# def test_create_with_venmo_account_nonce( self ) : #NEWLINE# #INDENT# customer_id = Customer . create ( ) . customer . id #NEWLINE# result = PaymentMethod . create ( { #NEWLINE# #INDENT# 'customer_id' : customer_id , #NEWLINE# 'payment_method_nonce' : Nonces . VenmoAccount , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( result . is_success ) #NEWLINE# venmo_account = result . payment_method #NEWLINE# self . assertIsInstance ( venmo_account , VenmoAccount ) #NEWLINE# self . assertTrue ( venmo_account . default ) #NEWLINE# self . assertIsNotNone ( venmo_account . token ) #NEWLINE# self . assertEqual ( venmo_account . username , 'venmojoe' ) #NEWLINE# self . assertEqual ( venmo_account . venmo_user_id , 'Venmo-Joe-1' ) #NEWLINE# self . assertEqual ( venmo_account . source_description , 'Venmo Account: venmojoe' ) #NEWLINE# self . assertRegexpMatches ( venmo_account . image_url , '\\.png' ) #NEWLINE# self . assertEqual ( venmo_account . customer_id , customer_id )