#NEWLINE# def test_from_nonce_with_unlocked_nonce_pointing_to_shared_card( self ) : #NEWLINE# #INDENT# config = Configuration . instantiate ( ) #NEWLINE# client_token = TestHelper . generate_decoded_client_token ( ) #NEWLINE# authorization_fingerprint = json . loads ( client_token ) [ 'authorizationFingerprint' ] #NEWLINE# http = ClientApiHttp ( config , { #NEWLINE# #INDENT# 'authorization_fingerprint' : authorization_fingerprint , #NEWLINE# 'shared_customer_identifier' : 'fake_identifier' , #NEWLINE# 'shared_customer_identifier_type' : 'testing' , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( status_code , response ) = http . add_card ( { #NEWLINE# #INDENT# 'credit_card' : { #NEWLINE# #INDENT# 'number' : '4111111111111111' , #NEWLINE# 'expiration_month' : '11' , #NEWLINE# 'expiration_year' : '2099' , #NEWLINE# #UNINDENT# } , #NEWLINE# 'share' : True , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( status_code , 201 ) #NEWLINE# nonce = json . loads ( response ) [ 'creditCards' ] [ 0 ] [ 'nonce' ] #NEWLINE# try : #NEWLINE# #INDENT# CreditCard . from_nonce ( nonce ) #NEWLINE# self . assertTrue ( False ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . assertIn ( 'not found' , str ( config ) )