`self.assertRaises(TypeError, ldb.Control, ldb, 1234)` is raising a
TypeError because `ldb` is not an ldb.Ldb object, it is the ldb module.
What we want to test here is that the non-string `1234` raises a
TypeError -- the previous line tests the type of the ldb argument.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
def test_control(self):
l = ldb.Ldb()
self.assertRaises(TypeError, ldb.Control, '<bad type>', 'relax:1')
- self.assertRaises(TypeError, ldb.Control, ldb, 1234)
+ self.assertRaises(TypeError, ldb.Control, l, 1234)
def test_modify(self):
l = ldb.Ldb()