From c3695026e1cfac3e835e937ed9343d82500cf197 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 11 Jan 2008 01:02:58 +0100 Subject: ldb/python: Implement __len__ for MessageElement. (This used to be commit a8f90ed34ce9341080b63c801ef54b82de42b8e6) --- source4/lib/ldb/tests/python/api.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib/ldb/tests/python') 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" -- cgit