summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests/python
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-06-11 18:09:40 +0400
committerMatthieu Patou <mat@samba.org>2011-06-20 09:23:15 +0200
commit29e043a2080143ea8ed19e5aa7880690b4ec4644 (patch)
treef04b307ffa5d5983ff5f245f093686832294fc73 /source4/lib/ldb/tests/python
parenta1f04e8abc761ef1ba211420ff1dbda50fcf527d (diff)
downloadsamba-29e043a2080143ea8ed19e5aa7880690b4ec4644.tar.gz
samba-29e043a2080143ea8ed19e5aa7880690b4ec4644.tar.bz2
samba-29e043a2080143ea8ed19e5aa7880690b4ec4644.zip
pyldb: add unit test for get(myattribute, defVal)
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/lib/ldb/tests/python')
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py
index a9f68cbd71..e7658d51ab 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"))