File: test_funding_details.py

package info (click to toggle)
python-braintree 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,376 kB
  • ctags: 1,998
  • sloc: python: 13,634; makefile: 73; sh: 8
file content (16 lines) | stat: -rw-r--r-- 630 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from tests.test_helper import *

class TestFundingDetails(unittest.TestCase):
    def test_repr_has_all_fields(self):
        details = FundingDetails({
            "destination": "bank",
            "routing_number": "11112222",
            "account_number_last_4": "3333",
            "email": "lucyloo@work.com",
            "mobile_phone": "9998887777"
        })

        regex = "<FundingDetails {account_number_last_4: '3333', routing_number: '11112222', destination: 'bank', email: 'lucyloo@work.com', mobile_phone: '9998887777'} at \w+>"

        matches = re.match(regex, repr(details))
        self.assertTrue(matches)