Coverage for mindsdb / integrations / handlers / salesforce_handler / connection_args.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1from collections import OrderedDict 

2 

3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE 

4 

5 

6connection_args = OrderedDict( 

7 username={ 

8 'type': ARG_TYPE.STR, 

9 'description': 'The username for the Salesforce account.', 

10 'required': True, 

11 'label': 'Username' 

12 }, 

13 password={ 

14 'type': ARG_TYPE.PWD, 

15 'description': 'The password for the Salesforce account.', 

16 'secret': True, 

17 'required': True, 

18 'label': 'Password' 

19 }, 

20 client_id={ 

21 'type': ARG_TYPE.STR, 

22 'description': 'The client ID (consumer key) from a connected app in Salesforce.', 

23 'required': True, 

24 'label': 'Client ID (Consumer Key)' 

25 }, 

26 client_secret={ 

27 'type': ARG_TYPE.STR, 

28 'description': 'The client secret (consumer secret) from a connected app in Salesforce.', 

29 'required': True, 

30 'label': 'Client Secret (Consumer Secret)' 

31 }, 

32 is_sandbox={ 

33 'type': ARG_TYPE.BOOL, 

34 'description': 'Set this to True if you need to connect to a sandbox, False for production environments. ' 

35 'If not provided defaults to False.', 

36 'required': False, 

37 'label': 'Is Sandbox' 

38 } 

39) 

40 

41connection_args_example = OrderedDict( 

42 username='demo@example.com', 

43 password='demo_password', 

44 client_id='3MVG9lKcPoNINVBIPJjdw1J9LLM82HnZz9Yh7ZJnY', 

45 client_secret='5A52C1A1E21DF9012IODC9ISNXXAADDA9', 

46 is_sandbox=True 

47)