diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-08-03 18:15:16 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-08-03 18:15:16 +0200 |
commit | bb944dcf64aeb308991d6e7fa4da0550b1c86489 (patch) | |
tree | 37acfc4eb3004a70579daf368a2f52e8ecc0c19f /source4/lib/ldb/tests/python | |
parent | 20225d83dd1d09274bd913d1713c56268a069628 (diff) | |
download | samba-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/python')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 6 |
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") |