summaryrefslogtreecommitdiff
path: root/source4/libcli/security
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-21 23:05:35 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-21 23:05:35 +0100
commit2227860a793dbde0b41e6ba1a720ac0d161ad784 (patch)
tree31e9701e978e4355362c199863d11ce52c04d5db /source4/libcli/security
parentd75c51eef34836f9eb5fa3449cef31f6463ce470 (diff)
downloadsamba-2227860a793dbde0b41e6ba1a720ac0d161ad784.tar.gz
samba-2227860a793dbde0b41e6ba1a720ac0d161ad784.tar.bz2
samba-2227860a793dbde0b41e6ba1a720ac0d161ad784.zip
Fix more tests, improve repr() functions for various Python types.
Diffstat (limited to 'source4/libcli/security')
-rw-r--r--source4/libcli/security/dom_sid.c2
-rw-r--r--source4/libcli/security/tests/bindings.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/source4/libcli/security/dom_sid.c b/source4/libcli/security/dom_sid.c
index a83ebb0aa1..e1a6b8e8ee 100644
--- a/source4/libcli/security/dom_sid.c
+++ b/source4/libcli/security/dom_sid.c
@@ -53,7 +53,7 @@ static int dom_sid_compare_auth(const struct dom_sid *sid1, const struct dom_sid
Compare two sids.
*****************************************************************/
-static int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid2)
+int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid2)
{
int i;
diff --git a/source4/libcli/security/tests/bindings.py b/source4/libcli/security/tests/bindings.py
index b539de833d..aee18a63b8 100644
--- a/source4/libcli/security/tests/bindings.py
+++ b/source4/libcli/security/tests/bindings.py
@@ -18,11 +18,11 @@
#
import unittest
-from samba import security
+from samba.dcerpc import security
class SecurityTokenTests(unittest.TestCase):
def setUp(self):
- self.token = security.SecurityToken()
+ self.token = security.token()
def test_is_system(self):
self.assertFalse(self.token.is_system())
@@ -47,17 +47,17 @@ class SecurityTokenTests(unittest.TestCase):
class SecurityDescriptorTests(unittest.TestCase):
def setUp(self):
- self.descriptor = security.SecurityDescriptor()
+ self.descriptor = security.descriptor()
class DomSidTests(unittest.TestCase):
def test_parse_sid(self):
- sid = security.Sid("S-1-5-21")
+ sid = security.dom_sid("S-1-5-21")
self.assertEquals("S-1-5-21", str(sid))
def test_sid_equal(self):
- sid1 = security.Sid("S-1-5-21")
- sid2 = security.Sid("S-1-5-21")
+ sid1 = security.dom_sid("S-1-5-21")
+ sid2 = security.dom_sid("S-1-5-21")
self.assertTrue(sid1.__eq__(sid1))
self.assertTrue(sid1.__eq__(sid2))
@@ -67,7 +67,7 @@ class DomSidTests(unittest.TestCase):
def test_repr(self):
sid = security.random_sid()
- self.assertTrue(repr(sid).startswith("Sid('S-1-5-21-"))
+ self.assertTrue(repr(sid).startswith("dom_sid('S-1-5-21-"))
class PrivilegeTests(unittest.TestCase):