1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

linked attribute tests: ensure duplicate deletes fail

We can't remove the same thing twice in the same message.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2017-10-25 12:13:57 +13:00 committed by Andrew Bartlett
parent 625e65d9f3
commit 7cf3bbcc5c

View File

@ -306,6 +306,11 @@ class LATests(samba.tests.TestCase):
self.remove_linked_attribute(g1, [])
self.assert_forward_links(g1, [])
# removing a duplicate link in the same message should fail
self.add_linked_attribute(g2, [u1, u2])
self.assertRaises(ldb.LdbError,
self.remove_linked_attribute,g2, [u1, u1])
def _test_la_links_delete_link_reveal(self):
u1, u2 = self.add_objects(2, 'user', 'u_del_link_reveal')
g1, g2 = self.add_objects(2, 'group', 'g_del_link_reveal')