diff options
Diffstat (limited to 'source4/lib/ldb/tests/python')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index d9dfce8718..0a5ba035ff 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -382,6 +382,12 @@ class MessageElementTests(unittest.TestCase): x = ldb.MessageElement(["foo"]) self.assertEquals(["foo"], list(x)) + def test_get_item(self): + x = ldb.MessageElement(["foo", "bar"]) + self.assertEquals("foo", x[0]) + self.assertEquals("bar", x[1]) + self.assertRaises(KeyError, lambda: x[-1]) + class ExampleModule: name = "example" |