summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-08-03 18:15:16 +0200
committerJelmer Vernooij <jelmer@samba.org>2009-08-03 18:15:16 +0200
commitbb944dcf64aeb308991d6e7fa4da0550b1c86489 (patch)
tree37acfc4eb3004a70579daf368a2f52e8ecc0c19f /source4/lib/ldb/tests
parent20225d83dd1d09274bd913d1713c56268a069628 (diff)
downloadsamba-bb944dcf64aeb308991d6e7fa4da0550b1c86489.tar.gz
samba-bb944dcf64aeb308991d6e7fa4da0550b1c86489.tar.bz2
samba-bb944dcf64aeb308991d6e7fa4da0550b1c86489.zip
pyldb: Raise proper exception when attempting to assign a string to a dn
attribute.
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/python/api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py
index 05e3da782e..110b1cabfe 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -279,6 +279,12 @@ class DnTests(unittest.TestCase):
def setUp(self):
self.ldb = ldb.Ldb(filename())
+ def test_set_dn_invalid(self):
+ x = ldb.Message()
+ def assign():
+ x.dn = "astring"
+ self.assertRaises(TypeError, assign)
+
def test_eq(self):
x = ldb.Dn(self.ldb, "dc=foo11,bar=bloe")
y = ldb.Dn(self.ldb, "dc=foo11,bar=bloe")