From: Douglas Bagnall Date: Tue, 24 Oct 2017 23:17:05 +0000 (+1300) Subject: linked attribute tests: fix logic for add test X-Git-Tag: tevent-0.9.34~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6294c84a53dea5ac13c4ef72017483254739271;p=thirdparty%2Fsamba.git linked attribute tests: fix logic for add test We were ensuring that when we got an LdbError it was the right type, but we weren't ensuring we got one at all. The new test doesn't fail. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/tests/python/linked_attributes.py b/source4/dsdb/tests/python/linked_attributes.py index f0c260564bf..1923f687749 100644 --- a/source4/dsdb/tests/python/linked_attributes.py +++ b/source4/dsdb/tests/python/linked_attributes.py @@ -401,6 +401,8 @@ class LATests(samba.tests.TestCase): self.fail("adding duplicate values, expected " "ERR_ENTRY_ALREADY_EXISTS, (%d) " "got %d" % (ldb.ERR_ENTRY_ALREADY_EXISTS, num)) + else: + self.fail("adding duplicate values succeed when it shouldn't") self.assert_forward_links(g1, [u1, u2, u3, u4]) self.assert_forward_links(g2, [u3, u1])