-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the update_settings with new helpdesk enrollment email param (#…
…147) * Update the update_settings with new helpdesk enrollment email param, and mark legacy params as deprecated * Remove extra files and try to fix tests * Remove unneeded files
- Loading branch information
1 parent
338c385
commit 7c5b115
Showing
5 changed files
with
95 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
from .. import util | ||
import duo_client.admin | ||
from .base import TestAdmin | ||
|
||
|
||
class TestSettings(TestAdmin): | ||
|
||
def test_update_settings(self): | ||
""" Test updating settings | ||
""" | ||
response = self.client_list.update_settings( | ||
lockout_threshold=10, | ||
lockout_expire_duration=60, | ||
inactive_user_expiration=30, | ||
log_retention_days=180, | ||
sms_batch=5, | ||
sms_expiration=60, | ||
sms_refresh=True, | ||
sms_message='test_message', | ||
fraud_email='test@example.com', | ||
fraud_email_enabled=True, | ||
keypress_confirm='0', | ||
keypress_fraud='9', | ||
timezone='UTC', | ||
telephony_warning_min=50, | ||
caller_id='+15035551000', | ||
user_telephony_cost_max=10, | ||
minimum_password_length=12, | ||
password_requires_upper_alpha=True, | ||
password_requires_lower_alpha=True, | ||
password_requires_numeric=True, | ||
password_requires_special=True, | ||
helpdesk_bypass="allow", | ||
helpdesk_bypass_expiration=60, | ||
helpdesk_message="test_message", | ||
helpdesk_can_send_enroll_email=True, | ||
reactivation_url="https://www.example.com", | ||
reactivation_integration_key='DINTEGRATIONKEYTEST0', | ||
security_checkup_enabled=True, | ||
) | ||
response = response[0] | ||
self.assertEqual(response['method'], 'POST') | ||
self.assertEqual(response['uri'], '/admin/v1/settings') | ||
self.assertEqual( | ||
util.params_to_dict(response['body']), | ||
{ | ||
'account_id': [self.client.account_id], | ||
'lockout_threshold': ['10'], | ||
'lockout_expire_duration': ['60'], | ||
'inactive_user_expiration': ['30'], | ||
'log_retention_days': ['180'], | ||
'sms_batch': ['5'], | ||
'sms_expiration': ['60'], | ||
'sms_refresh': ['1'], | ||
'sms_message': ['test_message'], | ||
'fraud_email': ['test@example.com'], | ||
'fraud_email_enabled': ['1'], | ||
'keypress_confirm': ['0'], | ||
'keypress_fraud': ['9'], | ||
'timezone': ['UTC'], | ||
'telephony_warning_min': ['50'], | ||
'caller_id': ['+15035551000'], | ||
'user_telephony_cost_max': ['10'], | ||
'minimum_password_length': ['12'], | ||
'password_requires_upper_alpha': ['1'], | ||
'password_requires_lower_alpha': ['1'], | ||
'password_requires_numeric': ['1'], | ||
'password_requires_special': ['1'], | ||
'helpdesk_bypass': ['allow'], | ||
'helpdesk_bypass_expiration': ['60'], | ||
'helpdesk_message': ['test_message'], | ||
'helpdesk_can_send_enroll_email': ['1'], | ||
'reactivation_url': ['https://www.example.com'], | ||
'reactivation_integration_key': ['DINTEGRATIONKEYTEST0'], | ||
'security_checkup_enabled': ['1'], | ||
}) |
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
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