We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50d6f1f commit e968f91Copy full SHA for e968f91
Tests/t_ldap_dn.py
@@ -78,6 +78,15 @@ def test_str2dn(self):
78
[('dc', 'com', 1)]
79
]
80
)
81
+ self.assertEqual(
82
+ ldap.dn.str2dn('uid=test42; ou=Testing; dc=example; dc=com', flags=ldap.DN_FORMAT_LDAPV2),
83
+ [
84
+ [('uid', 'test42', 1)],
85
+ [('ou', 'Testing', 1)],
86
+ [('dc', 'example', 1)],
87
+ [('dc', 'com', 1)]
88
+ ]
89
+ )
90
self.assertEqual(
91
ldap.dn.str2dn('uid=test\\, 42,ou=Testing,dc=example,dc=com', flags=0),
92
[
@@ -175,6 +184,10 @@ def test_explode_dn(self):
175
184
ldap.dn.explode_dn('uid=test42,ou=Testing,dc=example,dc=com', flags=0),
176
185
['uid=test42', 'ou=Testing', 'dc=example', 'dc=com']
177
186
187
188
+ ldap.dn.explode_dn('uid=test42; ou=Testing; dc=example; dc=com', flags=ldap.DN_FORMAT_LDAPV2),
189
+ ['uid=test42', 'ou=Testing', 'dc=example', 'dc=com']
190
178
191
179
192
ldap.dn.explode_dn('uid=test42,ou=Testing,dc=example,dc=com', notypes=True),
180
193
['test42', 'Testing', 'example', 'com']
0 commit comments