def test_live_full_bank_account(self):
        # Create a customer so that we can test payment creation against him
        result = Customer.create()
        customer_id = result.customer_id

        # Create a new bank account
        result = BankAccount.create(customer_id, FULL_BANK_ACCOUNT)
        payment_id = result.payment_id

        # Make sure the billing address we set is the same we get back
        result = BankAccount.details(customer_id, payment_id)
        self.assertEquals(FULL_BANK_ACCOUNT['billing'], result.payment_profile.bill_to)
    def test_live_full_bank_account(self):
        # Create a customer so that we can test payment creation against him
        result = Customer.create()
        customer_id = result.customer_id

        # Create a new bank account
        result = BankAccount.create(customer_id, FULL_BANK_ACCOUNT)
        payment_id = result.payment_id

        # Make sure the billing address we set is the same we get back
        result = BankAccount.details(customer_id, payment_id)
        self.assertEquals(FULL_BANK_ACCOUNT['billing'], result.payment_profile.bill_to)
    def test_live_bank_account(self):
        # Create a customer so that we can test payment creation against him
        result = Customer.create()
        customer_id = result.customer_id

        # Create a new bank account
        result = BankAccount.create(customer_id, BANK_ACCOUNT)
        payment_id = result.payment_id

        # Attempt to create a duplicate bank account entry. This will fail
        # since it is a duplicate payment method.
        self.assertRaises(AuthorizeResponseError, BankAccount.create,
                          customer_id, BANK_ACCOUNT)

        # Read credit card data
        result = BankAccount.details(customer_id, payment_id)
        self.assertEquals(PAYMENT_RESULT, result.payment_profile.payment)

        # Update credit card
        BankAccount.update(customer_id, payment_id, BANK_ACCOUNT)

        # Delete tests
        BankAccount.delete(customer_id, payment_id)
        self.assertRaises(AuthorizeResponseError, BankAccount.delete,
                          customer_id, payment_id)
    def test_live_bank_account(self):
        # Create a customer so that we can test payment creation against him
        result = Customer.create()
        customer_id = result.customer_id

        # Create a new bank account
        result = BankAccount.create(customer_id, BANK_ACCOUNT)
        payment_id = result.payment_id

        # Read credit card data
        result = BankAccount.details(customer_id, payment_id)
        self.assertEquals(PAYMENT_RESULT, result.payment_profile.payment)

        # Update credit card
        BankAccount.update(customer_id, payment_id, BANK_ACCOUNT)

        # Delete tests
        BankAccount.delete(customer_id, payment_id)
        self.assertRaises(AuthorizeResponseError, BankAccount.delete, customer_id, payment_id)