Esempio n. 1
0
    def test_program_gateway_create_success(self):
        """Creates a program gateway funding source."""

        funding_request = FundingSources.get_program_gateway_funding_request()

        source = self.client.funding_sources.program_gateway.create(
            funding_request)

        verify_gateway_program_funding_source_response(self, source,
                                                       funding_request)
    def test_program_gateway_save_empty_request(self):
        """Checks behavior when the update request is empty."""

        request = FundingSources.get_program_gateway_funding_request()

        source = self.client.funding_sources.program_gateway.create(request)

        updated = self.client.funding_sources.program_gateway.save(
            source.token, {})

        verify_gateway_program_funding_source_response(self, updated, request)
    def test_program_gateway_find_success(self):
        """Finds the program gateway it is searching for."""

        funding_request = FundingSources.get_program_gateway_funding_request()

        source = self.client.funding_sources.program_gateway.create(
            funding_request)

        found = self.client.funding_sources.program_gateway.find(source.token)

        verify = FundingSources.get_funding_source_verify(source)

        verify_gateway_program_funding_source_response(self, found, verify)
    def test_program_gateway_save_success(self):
        """Successfully updates a program gateway."""

        request = FundingSources.get_program_gateway_funding_request()

        source = self.client.funding_sources.program_gateway.create(request)

        request['url'] = 'https://qe_updated.marqeta.com'

        updated = self.client.funding_sources.program_gateway.save(
            source.token, request)

        verify_gateway_program_funding_source_response(self, updated, request)