File: test_address_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-- 598 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 *
from braintree.merchant_account.address_details import AddressDetails

class TestAddressDetails(unittest.TestCase):
    def test_repr_has_all_fields(self):
        details = AddressDetails({
            "street_address": "123 First St",
            "region": "Las Vegas",
            "locality": "NV",
            "postal_code": "89913"
        })

        regex = "<AddressDetails {street_address: '123 First St', locality: 'NV', region: 'Las Vegas', postal_code: '89913'} at \w+>"

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