mirror of
https://github.com/ansible/awx.git
synced 2026-04-11 13:09:21 -02:30
Add extra encoding to ldap_dn verification
Relates #391. Upstream `python-ldap` (surprisingly) does not support utf-8 DN. So explicit encoding is needed. Signed-off-by: Aaron Tan <jangsutsr@gmail.com>
This commit is contained in:
@@ -15,7 +15,4 @@ def test_ldap_default_network_timeout(mocker):
|
||||
from_db = mocker.Mock(**{'order_by.return_value': []})
|
||||
with mocker.patch('awx.conf.models.Setting.objects.filter', return_value=from_db):
|
||||
settings = LDAPSettings()
|
||||
assert settings.CONNECTION_OPTIONS == {
|
||||
ldap.OPT_REFERRALS: 0,
|
||||
ldap.OPT_NETWORK_TIMEOUT: 30
|
||||
}
|
||||
assert settings.CONNECTION_OPTIONS[ldap.OPT_NETWORK_TIMEOUT] == 30
|
||||
|
||||
Reference in New Issue
Block a user