git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1f04e8
)
pyldb: add unit test for get(myattribute, defVal)
author
Matthieu Patou
<mat@matws.net>
Sat, 11 Jun 2011 14:09:40 +0000
(18:09 +0400)
committer
Matthieu Patou
<mat@samba.org>
Mon, 20 Jun 2011 07:23:15 +0000
(09:23 +0200)
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Jun 20 09:23:15 CEST 2011 on sn-devel-104
source4/lib/ldb/tests/python/api.py
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/tests/python/api.py
b/source4/lib/ldb/tests/python/api.py
index a9f68cbd71547b6bdef43a948653b84dbf23f829..e7658d51ab6125701f4677e48a7edc1c64a84dd2 100755
(executable)
--- 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"))