Skip to content

Commit

Permalink
Added test for increment: lines in LDIF changes records
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Jul 12, 2017
1 parent 3fd7216 commit a239152
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion Tests/t_ldif.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
See http://www.python-ldap.org/ for details.
$Id: t_ldif.py,v 1.22 2016/07/30 17:15:22 stroeder Exp $
$Id: t_ldif.py,v 1.23 2017/07/12 18:05:27 stroeder Exp $
"""

# from Python's standard lib
Expand Down Expand Up @@ -645,6 +645,29 @@ def test_bad_change_records(self):
else:
self.fail("should have raised ValueError: %r" % ldif_str)

def test_mod_increment(self):
self.check_records(
"""
version: 1
dn: cn=x,cn=y,cn=z
changetype: modify
increment: gidNumber
gidNumber: 1
-
""",
[
(
'cn=x,cn=y,cn=z',
[
(ldif.MOD_OP_INTEGER['increment'], 'gidNumber', [b'1']),
],
None,
),
],
)


if __name__ == '__main__':
unittest.main()

0 comments on commit a239152

Please sign in to comment.