Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydocusign provides templates of DocuSign's notification callbacks #14

Closed
benoitbryon opened this issue Oct 1, 2014 · 3 comments
Closed
Assignees
Labels

Comments

@benoitbryon
Copy link
Contributor

As a developer of software that uses DocuSign API via pydocusign,
in order to test the behaviour of an HTTP service that receive DocuSign's notification callbacks,
I want to fake these DocuSign's notification requests.

I do not want to follow a complete DocuSign workflow, mostly because:

  • it is quite long to create an envelope and sign it (several remote API calls)
  • it is quite hard to automatically sign a document (at the moment, I do not know howto)
  • while I'm developing a web service, it is usually unreachable from the internet, i.e. DocuSign servers won't be able to send notifications to the service...

So, I'd like the following things:

  • tools to generate requests that fake/mock/stub/whatever DocuSign's notification requests. For the body contents, templates may be a good option.
  • if possible, tests to validate that pydocusign's templates are up to date and actually look like the ones sent by DocuSign itself... At the moment, I do not know how to achieve this feature.
@benoitbryon
Copy link
Contributor Author

When I think about templates, I think about Jinja2 or other template engines. But this would be a dependency used for test purpose only. So as a developer, in order to run my pydocusign-based application, I would install (automatically, as a pydocusign's dependency) Jinja2, even if I do not use it at runtime.

@benoitbryon
Copy link
Contributor Author

I would install Jinja2, even if I do not use it at runtime.

Isn't it a bit overkill?

An option for this issue would be to use http://diecutter.io template rendering service:

  • create templates in pydocusign repository
  • optionnally add a HTML form to submit data manually (human user interface)
  • in pydocusign's tests, use requests to generate content using templates, data and diecutter generator

Third-party pydocusign-based applications would also be able to use these resources online: diecutter with templates provided by pydocusign.

A drawback of this solution would be performance: generating files using online templates and online HTTP service is slower than generating files using local templates and local software.

Another drawback would be to depend on online service availability.

@benoitbryon
Copy link
Contributor Author

Proposal:

  • create the templates using Jinja2 markup
  • (optionally create HTML form as human user interface)
  • at first, use http://diecutter.io to generate the files. See if it works and if it is enough for tests. It may be enough.
  • later, if performances are too bad, consider adding Jinja2 as a dependency

benoitbryon added a commit that referenced this issue Oct 14, 2014
benoitbryon added a commit that referenced this issue Oct 14, 2014
benoitbryon added a commit that referenced this issue Oct 14, 2014
@benoitbryon benoitbryon modified the milestones: Soon, 0.7 - Callback templates Oct 15, 2014
@benoitbryon benoitbryon self-assigned this Oct 15, 2014
benoitbryon added a commit that referenced this issue Oct 16, 2014
…using templates. Improved template to support more events.
benoitbryon added a commit that referenced this issue Oct 16, 2014
…gnCallbackParser that use callback template.
benoitbryon added a commit that referenced this issue Oct 16, 2014
…red pseudo-constants for envelope and recipient events in models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant