summaryrefslogtreecommitdiff
path: root/source4/libcli/security/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-12-30 21:59:50 +0100
committerAndrew Tridgell <tridge@samba.org>2009-12-31 17:33:33 +1100
commitdbd7a62baa56eb2ce082fdcf24e2d8621a4f54ea (patch)
treeb4811862f7c1dee0ca636fee295bd9e0eba5e063 /source4/libcli/security/tests
parent66f81d18ce08cfb1ed6c347a753b436d3de8ced7 (diff)
downloadsamba-dbd7a62baa56eb2ce082fdcf24e2d8621a4f54ea.tar.gz
samba-dbd7a62baa56eb2ce082fdcf24e2d8621a4f54ea.tar.bz2
samba-dbd7a62baa56eb2ce082fdcf24e2d8621a4f54ea.zip
py/security: Add test for dom_sid.split.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/libcli/security/tests')
-rw-r--r--source4/libcli/security/tests/bindings.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/libcli/security/tests/bindings.py b/source4/libcli/security/tests/bindings.py
index 00fa05d070..6fe3d5471d 100644
--- a/source4/libcli/security/tests/bindings.py
+++ b/source4/libcli/security/tests/bindings.py
@@ -2,17 +2,17 @@
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
@@ -46,6 +46,7 @@ class SecurityTokenTests(unittest.TestCase):
class SecurityDescriptorTests(unittest.TestCase):
+
def setUp(self):
self.descriptor = security.descriptor()
@@ -100,6 +101,10 @@ class SecurityDescriptorTests(unittest.TestCase):
desc1 = security.descriptor.from_sddl(text, dom)
self.assertNotEqual(desc1.as_sddl(), desc1.as_sddl(dom))
+ def test_split(self):
+ dom = security.dom_sid("S-2-0-7")
+ self.assertEquals((security.dom_sid("S-2-0"), 7), dom.split())
+
class DomSidTests(unittest.TestCase):
def test_parse_sid(self):