def test_funding_sources_addresses_find_business(self): """Finds a business address.""" address = FundingSources.get_business_card_holder_address() found = self.client.funding_sources.addresses.find(address.token) verify_card_holder_address_response( self, found, self.get_address_expected(address))
def test_addresses_save_business(self): """Updates the funding source address for a business.""" address = FundingSources.get_business_card_holder_address() updated = self.client.funding_sources.addresses.save( address.token, self.get_address_update()) verify_card_holder_address_response(self, updated, self.get_address_update())
def test_addresses_list_for_business_one(self): """Tests when one funding source address should be returned.""" business = self.client.businesses.create({}) address = FundingSources.get_business_card_holder_address(business) FundingSources.get_business_payment_card(business) addresses = self.client.funding_sources.addresses.list_for_business( business.token) self.assertEqual(len(addresses), 1, 'Incorrect number of addresses returned') verify_card_holder_address_response( self, addresses[0], address.__dict__)