forked from docusign/code-examples-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_config.py
More file actions
66 lines (60 loc) · 2.81 KB
/
test_config.py
File metadata and controls
66 lines (60 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import os
from dotenv import load_dotenv
load_dotenv()
def get_configuration():
data = {
"signer_client_id": '1000',
"return_url": "http://localhost:5000/ds-return",
"ping_url": "http://localhost:5000/",
"private_key_filename": "./app/private.key",
"base_path": 'https://demo.docusign.net/restapi',
"oauth_base_path": 'account-d.docusign.com',
"redirect_uri": 'https://www.docusign.com/api',
"scopes": ["signature", "impersonation"],
"click_scopes": ["click.manage", "click.send"],
"rooms_scopes": ["dtr.rooms.read", "dtr.rooms.write", "dtr.documents.read",
"dtr.documents.write", "dtr.profile.read", "dtr.profile.write",
"dtr.company.read", "dtr.company.write", "room_forms"],
"admin_scopes": ["organization_read", "group_read", "permission_read",
"user_read", "user_write", "account_read",
"domain_read", "identity_provider_read", "user_data_redact",
"asset_group_account_read", "asset_group_account_clone_write",
"asset_group_account_clone_read"],
"expires_in": 3600,
"test_pdf_file": './app/tests/docs/World_Wide_Corp_lorem.pdf',
"test_docx_file": './app/tests/docs/World_Wide_Corp_Battle_Plan_Trafalgar.docx',
"test_template_pdf_file": './app/tests/docs/World_Wide_Corp_fields.pdf',
"test_template_docx_file": './app/tests/docs/World_Wide_Corp_salary.docx',
"template_name": 'Example Signer and CC template',
"cc_name": 'Test Name',
"cc_email": 'test@mail.com',
"signer2_name": 'Test signer2',
"signer2_email": 'test.signer2@mail.com',
"cc2_name": 'Test cc2',
"cc2_email": 'test.cc2@mail.com',
"item": 'Item',
"quantity": '5',
"permission_profile_name": "Test_Profile",
"brand_name": "Test_Brand",
"default_language": "en",
"clickwrap_name": "Test_Clickwrap",
"clickwrap_version_number": "1"
}
if os.environ.get("CLIENT_ID") is not None:
config = {
"ds_client_id": os.environ.get("CLIENT_ID"),
"ds_impersonated_user_id": os.environ.get("USER_ID"),
"signer_email": os.environ.get("SIGNER_EMAIL"),
"signer_name": os.environ.get("SIGNER_NAME"),
"private_key_file": "./app/private.key"
}
else:
from ..ds_config import DS_CONFIG, DS_JWT
config = {
"ds_client_id": DS_JWT["ds_client_id"],
"ds_impersonated_user_id": DS_JWT["ds_impersonated_user_id"],
"signer_email": DS_CONFIG["signer_email"],
"signer_name": DS_CONFIG["signer_name"],
"private_key_file": DS_JWT["private_key_file"]
}
return data | config