#NEWLINE# def test_create_with_fake_android_pay_network_token_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 . AndroidPayCardMasterCard , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( customer_id . is_success ) #NEWLINE# android_pay_card = result . payment_method #NEWLINE# self . assertIsInstance ( android_pay_card , AndroidPayCard ) #NEWLINE# self . assertNotEqual ( android_pay_card . token , None ) #NEWLINE# self . assertEqual ( android_pay_card . customer_id , customer_id ) #NEWLINE# self . assertEqual ( CreditCard . CardType . MasterCard , android_pay_card . virtual_card_type ) #NEWLINE# self . assertEqual ( '4444' , android_pay_card . virtual_card_last_4 ) #NEWLINE# self . assertEqual ( 'MasterCard 4444' , android_pay_card . source_description ) #NEWLINE# self . assertEqual ( CreditCard . CardType . MasterCard , android_pay_card . source_card_type ) #NEWLINE# self . assertEqual ( '4444' , android_pay_card . source_card_last_4 ) #NEWLINE# self . assertEqual ( '4444' , android_pay_card . last_4 ) #NEWLINE# self . assertEqual ( CreditCard . CardType . MasterCard , android_pay_card . card_type ) #NEWLINE# self . assertTrue ( android_pay_card . default ) #NEWLINE# self . assertIn ( 'android_pay' , android_pay_card . image_url ) #NEWLINE# self . assertTrue ( ( int ( android_pay_card . expiration_month ) > 0 ) ) #NEWLINE# self . assertTrue ( ( int ( android_pay_card . expiration_year ) > 0 ) ) #NEWLINE# self . assertIsInstance ( android_pay_card . created_at , datetime ) #NEWLINE# self . assertIsInstance ( android_pay_card . updated_at , datetime ) #NEWLINE# self . assertEqual ( '555555' , android_pay_card . bin ) #NEWLINE# self . assertEqual ( 'google_transaction_id' , android_pay_card . google_transaction_id )