diff --git a/Tests/t_ldap_dn.py b/Tests/t_ldap_dn.py index 9a3c54a..97274f3 100644 --- a/Tests/t_ldap_dn.py +++ b/Tests/t_ldap_dn.py @@ -78,6 +78,15 @@ def test_str2dn(self): [('dc', 'com', 1)] ] ) + self.assertEqual( + ldap.dn.str2dn('uid=test42; ou=Testing; dc=example; dc=com', flags=ldap.DN_FORMAT_LDAPV2), + [ + [('uid', 'test42', 1)], + [('ou', 'Testing', 1)], + [('dc', 'example', 1)], + [('dc', 'com', 1)] + ] + ) self.assertEqual( ldap.dn.str2dn('uid=test\\, 42,ou=Testing,dc=example,dc=com', flags=0), [ @@ -175,6 +184,10 @@ def test_explode_dn(self): ldap.dn.explode_dn('uid=test42,ou=Testing,dc=example,dc=com', flags=0), ['uid=test42', 'ou=Testing', 'dc=example', 'dc=com'] ) + self.assertEqual( + ldap.dn.explode_dn('uid=test42; ou=Testing; dc=example; dc=com', flags=ldap.DN_FORMAT_LDAPV2), + ['uid=test42', 'ou=Testing', 'dc=example', 'dc=com'] + ) self.assertEqual( ldap.dn.explode_dn('uid=test42,ou=Testing,dc=example,dc=com', notypes=True), ['test42', 'Testing', 'example', 'com']