Exemple #1
0
    def worker(args):
        """
        1. Call the envelope get method
        """

        # Exceptions will be caught by the calling function
        api_client = create_api_client(base_path=args["base_path"],
                                       access_token=args["access_token"])
        envelopes_api = EnvelopesApi(api_client)
        results = envelopes_api.get_form_data(account_id=args["account_id"],
                                              envelope_id=args["envelope_id"])

        return results
Exemple #2
0
    def testGetFormData(self):
        try:
            envelopes_api = EnvelopesApi()

            form_data = envelopes_api.get_form_data(
                account_id=self.user_info.accounts[0].account_id,
                envelope_id=self.envelope_id)
            assert form_data is not None
            assert form_data.prefill_form_data is not None
            assert form_data.prefill_form_data.form_data[0] is not None
            assert form_data.prefill_form_data.form_data[0].name is not None

        except ApiException as e:
            print("\nException when calling DocuSign API: %s" % e)
            assert e is None  # make the test case fail in case of an API exception
        except Exception as e:
            print("\nException when calling DocuSign API: %s" % e)
            assert e is None  # make the test case fail in case of an API exception