git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4fff36f
)
Adapt Zahari's test to the generic LDB Python tests.
author
Jelmer Vernooij
<jelmer@samba.org>
Fri, 20 Mar 2009 21:58:15 +0000
(22:58 +0100)
committer
Jelmer Vernooij
<jelmer@samba.org>
Fri, 20 Mar 2009 21:58:15 +0000
(22:58 +0100)
source4/lib/ldb/tests/python/api.py
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/tests/python/api.py
b/source4/lib/ldb/tests/python/api.py
index c372b8fa71e627de0c16039495db59eea8521b16..07500e23728d9c86bc9640fdcacfc2c195a17ebc 100755
(executable)
--- a/
source4/lib/ldb/tests/python/api.py
+++ b/
source4/lib/ldb/tests/python/api.py
@@
-258,6
+258,19
@@
class SimpleLdb(unittest.TestCase):
l = ldb.Ldb(filename())
l.set_debug(my_report_fn)
l = ldb.Ldb(filename())
l.set_debug(my_report_fn)
+ def test_zero_byte_string(self):
+ """Testing we do not get trapped in the \0 byte in a property string."""
+ l = ldb.Ldb(filename())
+ l.add({
+ "dn" : "dc=somedn",
+ "objectclass" : "user",
+ "cN" : "LDAPtestUSER",
+ "givenname" : "ldap",
+ "displayname" : "foo\0bar",
+ })
+ res = l.search(expression="(dn=dc=somedn)")
+ self.assertEquals("foo\0bar", res[0]["displayname"][0])
+
class DnTests(unittest.TestCase):
def setUp(self):
class DnTests(unittest.TestCase):
def setUp(self):