File: test_disbursement.py

package info (click to toggle)
python-braintree 4.31.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,576 kB
  • sloc: python: 28,946; makefile: 9; sh: 8
file content (25 lines) | stat: -rw-r--r-- 971 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from tests.test_helper import *
from datetime import date

class TestDisbursement(unittest.TestCase):
    def test_disbursement_finds_transactions(self):
        disbursement = Disbursement(Configuration.gateway(), {
            "merchant_account": {
                "id": "sub_merchant_account",
                "status": "active",
                "master_merchant_account": {
                    "id": "master_merchant_account",
                    "status": "active"
                },
            },
            "id": "123456",
            "exception_message": "invalid_account_number",
            "amount": "100.00",
            "disbursement_date": date(2013, 4, 10),
            "follow_up_action": "update",
            "transaction_ids": ["sub_merchant_transaction"]
        })

        transactions = disbursement.transactions()
        self.assertEqual(1, transactions.maximum_size)
        self.assertEqual("sub_merchant_transaction", transactions.first.id)