-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend signer-class with editors beside of signers
- Loading branch information
1 parent
421cece
commit 2d4dc5d
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,15 +31,36 @@ def test_store_signing_document_metadata_when_starting_sign_process(self, mocker | |
mocker.post(re.compile('/signing-jobs'), json=DEFAULT_MOCK_RESPONSE) | ||
signer = Signer(self.document) | ||
|
||
signers = ['[email protected]'] | ||
editors = ['[email protected]'] | ||
with freeze(FROZEN_NOW): | ||
signer.start_signing(['[email protected]']) | ||
signer.start_signing(signers, editors) | ||
|
||
request = mocker.last_request.json() | ||
request['access_token'] = '<token>' | ||
request['download_url'] = '<download-url>' | ||
|
||
self.assertDictEqual( | ||
{ | ||
u'access_token': u'<token>', | ||
u'document_uid': u'createtreatydossiers000000000002', | ||
u'document_url': u'http://nohost/plone/ordnungssystem/fuhrung/vertrage-und-vereinbarungen/dossier-1/document-14', | ||
u'download_url': u'<download-url>', | ||
u'editors': [u'[email protected]'], | ||
u'signers': [u'[email protected]'], | ||
u'title': u'Vertr\xe4gsentwurf', | ||
u'upload_url': u'http://nohost/plone/ordnungssystem/fuhrung/vertrage-und-vereinbarungen/dossier-1/document-14/@upload-signed-pdf' | ||
}, | ||
request | ||
) | ||
|
||
self.assertDictEqual( | ||
{ | ||
'created': u'2024-02-18T15:45:00', | ||
'job_id': '1', | ||
'redirect_url': 'http://external.example.org/signing-requests/123', | ||
'signers': [{u'email': u'[email protected]', u'userid': u''}], | ||
'editors': [{u'email': u'[email protected]', u'userid': u''}], | ||
'userid': 'regular_user', | ||
'version': 0 | ||
}, signer.serialize_pending_signing_job()) | ||
|