summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-11 01:02:58 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-11 01:04:25 +0100
commitc3695026e1cfac3e835e937ed9343d82500cf197 (patch)
tree1e3bcbfb58bd300340e044a9879a09ada5925af6 /source4/lib/ldb/tests/python
parent9269db983d847be7a0cdc9eb2bcc4ebe3066be1c (diff)
downloadsamba-c3695026e1cfac3e835e937ed9343d82500cf197.tar.gz
samba-c3695026e1cfac3e835e937ed9343d82500cf197.tar.bz2
samba-c3695026e1cfac3e835e937ed9343d82500cf197.zip
ldb/python: Implement __len__ for MessageElement.
(This used to be commit a8f90ed34ce9341080b63c801ef54b82de42b8e6)
Diffstat (limited to 'source4/lib/ldb/tests/python')
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py
index 0a5ba035ff..5ab40106a8 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -388,6 +388,10 @@ class MessageElementTests(unittest.TestCase):
self.assertEquals("bar", x[1])
self.assertRaises(KeyError, lambda: x[-1])
+ def test_len(self):
+ x = ldb.MessageElement(["foo", "bar"])
+ self.assertEquals(2, len(x))
+
class ExampleModule:
name = "example"