summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-23 15:10:35 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-23 15:10:35 +0200
commit5eed56d0ad5245a346ea564bc34e882828394611 (patch)
treea8c408dc8922d024fd639a4852f4426ed23af53d /source4
parentdff31b1dc0ec1aea8cec9d5764f4f3a4c109a848 (diff)
downloadsamba-5eed56d0ad5245a346ea564bc34e882828394611.tar.gz
samba-5eed56d0ad5245a346ea564bc34e882828394611.tar.bz2
samba-5eed56d0ad5245a346ea564bc34e882828394611.zip
Fix bugs in samr python tests.
(This used to be commit 09c6b106ac144820b8c072bda4dad3d8e2145ff0)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/bin/samr.py6
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/sam.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/bin/samr.py b/source4/scripting/bin/samr.py
index 118cf759fe..e91b5bc312 100755
--- a/source4/scripting/bin/samr.py
+++ b/source4/scripting/bin/samr.py
@@ -24,7 +24,7 @@ import sys
sys.path.insert(0, "bin/python")
-from samba.dcerpc import samr, security
+from samba.dcerpc import samr, security, lsa
def FillUserInfo(samr, dom_handle, users, level):
"""fill a user array with user information from samrQueryUserInfo"""
@@ -69,10 +69,10 @@ def test_EnumDomainUsers(samr, dom_handle):
def test_EnumDomainGroups(samr, dom_handle):
"""test the samr_EnumDomainGroups interface"""
print "Testing samr_EnumDomainGroups"
- groups = toArray(samr.EnumDomainGroups(dom_handle, 0, 0, -1))
+ groups = toArray(samr.EnumDomainGroups(dom_handle, 0, 0))
print "Found %d groups" % len(groups)
for idx, group in groups:
- print "\t" + group + "\t(" + idx + ")"
+ print "\t%s\t(%d)" % (group, idx)
def test_domain_ops(samr, dom_handle):
"""test domain specific ops"""
diff --git a/source4/scripting/python/samba/tests/dcerpc/sam.py b/source4/scripting/python/samba/tests/dcerpc/sam.py
index e685f9b4f4..50e00a3f9e 100644
--- a/source4/scripting/python/samba/tests/dcerpc/sam.py
+++ b/source4/scripting/python/samba/tests/dcerpc/sam.py
@@ -37,7 +37,7 @@ class SamrTests(RpcInterfaceTestCase):
(level, info, handle) = self.conn.Connect5(None, 0, 1, samr.ConnectInfo1())
def test_connect2(self):
- (level, info, handle) = self.conn.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)
+ handle = self.conn.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)
def test_EnumDomains(self):
handle = self.conn.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)