Skip to content

Commit

Permalink
Added TestParse.test_comments()
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Feb 6, 2016
1 parent 9b789fc commit d74cac9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Tests/t_ldif.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,29 @@ def test_sorted(self):
'c': [b'value_c']}),
])

def test_comments(self):
self.check_roundtrip("""
# comment #1
dn: cn=x1,cn=y1,cn=z1
b1: value_b1
c1: value_c1
a1: value_a1
# comment #2
dn: cn=x2,cn=y2,cn=z2
b2: value_b2
c2: value_c2
a2: value_a2
""", [
('cn=x1,cn=y1,cn=z1', {'a1': [b'value_a1'],
'b1': [b'value_b1'],
'c1': [b'value_c1']}),
('cn=x2,cn=y2,cn=z2', {'a2': [b'value_a2'],
'b2': [b'value_b2'],
'c2': [b'value_c2']}),
])


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

0 comments on commit d74cac9

Please sign in to comment.