From 29e043a2080143ea8ed19e5aa7880690b4ec4644 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sat, 11 Jun 2011 18:09:40 +0400 Subject: [PATCH] pyldb: add unit test for get(myattribute, defVal) Autobuild-User: Matthieu Patou Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104 --- source4/lib/ldb/tests/python/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index a9f68cbd715..e7658d51ab6 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -516,6 +516,11 @@ class LdbMsgTests(unittest.TestCase): self.msg["foo"] = ["bar"] self.assertEquals("bar", self.msg.get("foo")[0]) + def test_get_default(self): + self.assertEquals(None, self.msg.get("tatayoyo")) + + self.assertEquals("anniecordie", self.msg.get("tatayoyo", "anniecordie")) + def test_get_unknown(self): self.assertEquals(None, self.msg.get("lalalala")) -- 2.34.1