Skip to content

Commit 1266c65

Browse files
tiranencukou
authored andcommitted
Ignore SASL methods in DSE test
OpenLDAP may not offer SASL in restricted environments. #163 Closes: #160 Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 2387fe6 commit 1266c65

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Tests/t_ldapobject.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,15 @@ def test_dse(self):
520520
dse = self._ldap_conn.read_rootdse_s()
521521
self.assertIsInstance(dse, dict)
522522
self.assertEqual(dse[u'supportedLDAPVersion'], [b'3'])
523+
keys = set(dse)
524+
# SASL info may be missing in restricted build environments
525+
keys.discard(u'supportedSASLMechanisms')
523526
self.assertEqual(
524-
sorted(dse),
525-
[u'configContext', u'entryDN', u'namingContexts', u'objectClass',
527+
keys,
528+
{u'configContext', u'entryDN', u'namingContexts', u'objectClass',
526529
u'structuralObjectClass', u'subschemaSubentry',
527530
u'supportedControl', u'supportedExtension', u'supportedFeatures',
528-
u'supportedLDAPVersion', u'supportedSASLMechanisms']
531+
u'supportedLDAPVersion'}
529532
)
530533
self.assertEqual(
531534
self._ldap_conn.get_naming_contexts(),

0 commit comments

Comments
 (0)