mirror of
https://github.com/samba-team/samba.git
synced 2025-12-16 00:23:52 +03:00
s4/librpc/py_security: use SDDLValueError for better error messages
The aim is to allow samba-tool to tell users where their SDDL went wrong. Some tests would turn into errors (not knownfail-able failures) if they were not changed at the same time, so they are changed too. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
fd8cf82be1
commit
d7fe04205f
@@ -67,7 +67,7 @@ class SecurityDescriptorTests(samba.tests.TestCase):
|
||||
self.assertEqual(desc.type, 0x8004)
|
||||
|
||||
def test_from_sddl_invalidsddl(self):
|
||||
self.assertRaises(ValueError, security.descriptor.from_sddl, "foo",
|
||||
self.assertRaises(security.SDDLValueError, security.descriptor.from_sddl, "foo",
|
||||
security.dom_sid("S-1-2-3"))
|
||||
|
||||
def test_from_sddl_invalidtype1(self):
|
||||
|
||||
Reference in New Issue
Block a user