@@ -617,6 +617,77 @@ def testGetDiagnosticLogs(self):
617617 print ("\n Exception when calling DocuSign API: %s" % e )
618618 assert e is None # make the test case fail in case of an API exception
619619
620+ def testGetFormData (self ):
621+ try :
622+ envelopes_api = EnvelopesApi ()
623+
624+ form_data = envelopes_api .get_form_data (account_id = self .user_info .accounts [0 ].account_id ,
625+ envelope_id = self .envelope_id )
626+ assert form_data is not None
627+ assert form_data .prefill_form_data is not None
628+ assert form_data .prefill_form_data .form_data [0 ] is not None
629+ assert form_data .prefill_form_data .form_data [0 ].name is not None
630+
631+ except ApiException as e :
632+ print ("\n Exception when calling DocuSign API: %s" % e )
633+ assert e is None # make the test case fail in case of an API exception
634+
635+ def testListTabs (self ):
636+ # For this the template Role should be manager
637+ template_role_name = 'Manager'
638+
639+ # Set properties and create an envelope later on
640+ email_subject = 'Please Sign my Python SDK Envelope'
641+ email_blurb = 'Hello, Please sign my Python SDK Envelope.'
642+
643+ # assign template information including ID and role(s)
644+ template_id = TemplateId
645+
646+ # create a template role with a valid templateId and roleName and assign signer info
647+ role_name = template_role_name
648+ name = 'Pat Developer'
649+ email = Username
650+ t_role = docusign .TemplateRole (role_name = role_name ,
651+ name = name ,
652+ email = email )
653+
654+ # create a list of template roles and add our newly created role
655+ # assign template role(s) to the envelope
656+ template_roles = [t_role ]
657+
658+ # send the envelope by setting |status| to "sent". To save as a draft set to "created"
659+ status = 'sent'
660+
661+ # create the envelope definition with the properties set
662+ envelope_definition = docusign .EnvelopeDefinition (email_subject = email_subject ,
663+ email_blurb = email_blurb ,
664+ template_id = template_id ,
665+ template_roles = template_roles ,
666+ status = status )
667+ try :
668+ envelopes_api = EnvelopesApi ()
669+
670+ # Create Envelope with the new role
671+ envelope_summary = envelopes_api .create_envelope (self .user_info .accounts [0 ].account_id ,
672+ envelope_definition = envelope_definition )
673+ # Read the new Envelope
674+ created_envelope = envelopes_api .get_envelope (account_id = self .user_info .accounts [0 ].account_id ,
675+ envelope_id = envelope_summary .envelope_id )
676+
677+ recipients = envelopes_api .list_recipients (account_id = self .user_info .accounts [0 ].account_id ,
678+ envelope_id = created_envelope .envelope_id )
679+
680+ tabs = envelopes_api .list_tabs (account_id = self .user_info .accounts [0 ].account_id ,
681+ envelope_id = created_envelope .envelope_id ,
682+ recipient_id = recipients .signers [0 ].recipient_id )
683+ list_tabs = tabs .list_tabs
684+
685+ assert list_tabs is not None
686+
687+ except ApiException as e :
688+ print ("\n Exception when calling DocuSign API: %s" % e )
689+ assert e is None # make the test case fail in case of an API exception
690+
620691 def testMoveEnvelopes (self ):
621692 with open (SignTest1File , 'rb' ) as sign_file :
622693 file_contents = sign_file .read ()
0 commit comments