diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/tests/dsdb_schema_attributes.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/samba/tests/dsdb_schema_attributes.py b/python/samba/tests/dsdb_schema_attributes.py index c3b956f3b99..dbfafc4122d 100644 --- a/python/samba/tests/dsdb_schema_attributes.py +++ b/python/samba/tests/dsdb_schema_attributes.py @@ -242,3 +242,16 @@ systemOnly: FALSE self.assertEquals(str(res[0].dn), "@INDEXLIST") self.assertEquals(len(res[0]), 0) self.assertFalse("@TEST_EXTRA" in res[0]) + + def test_modify_fail_of_at_indexlist(self): + m = {"dn": "@INDEXLIST", + "@TEST_NOT_EXTRA": ["1"] + } + + msg = ldb.Message.from_dict(self.samdb, m, ldb.FLAG_MOD_DELETE) + try: + self.samdb.modify(msg) + self.fail("modify of @INDEXLIST with a failed constraint should fail") + except LdbError as err: + enum = err.args[0] + self.assertEquals(enum, ldb.ERR_NO_SUCH_ATTRIBUTE) |
