BUG: https://bugzilla.samba.org/show_bug.cgi?id=14845
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14848
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
b018e51d2725a23b2fedd3058644b8021f6a6a06)
def test_notpresent(self):
self.assertRaises(KeyError, lambda: self.msg["foo"])
+ def test_invalid(self):
+ try:
+ self.assertRaises(TypeError, lambda: self.msg[42])
+ except KeyError:
+ self.fail()
+
def test_del(self):
del self.msg["foo"]
--- /dev/null
+^ldb.python.api.LdbMsgTests.test_invalid