1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-29 15:42:04 +03:00

PEP8: fix E302: expected 2 blank lines, found 1

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Joe Guo
2018-07-30 18:20:39 +12:00
committed by Douglas Bagnall
parent 542e91ef92
commit 211c9a5f85
180 changed files with 480 additions and 0 deletions

View File

@ -26,9 +26,11 @@ sys.path.insert(0, "bin/python")
from samba.dcerpc import samr, security
def display_lsa_string(str):
return str.string
def FillUserInfo(samr, dom_handle, users, level):
"""fill a user array with user information from samrQueryUserInfo"""
for i in range(len(users)):
@ -39,6 +41,7 @@ def FillUserInfo(samr, dom_handle, users, level):
users[i] = info
samr.Close(user_handle)
def toArray((handle, array, num_entries)):
ret = []
for x in range(num_entries):
@ -51,16 +54,19 @@ def test_Connect(samr):
print "Testing samr_Connect"
return samr.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)
def test_LookupDomain(samr, handle, domain):
"""test the samr_LookupDomain interface"""
print "Testing samr_LookupDomain"
return samr.LookupDomain(handle, domain)
def test_OpenDomain(samr, handle, sid):
"""test the samr_OpenDomain interface"""
print "Testing samr_OpenDomain"
return samr.OpenDomain(handle, security.SEC_FLAG_MAXIMUM_ALLOWED, sid)
def test_EnumDomainUsers(samr, dom_handle):
"""test the samr_EnumDomainUsers interface"""
print "Testing samr_EnumDomainUsers"
@ -69,6 +75,7 @@ def test_EnumDomainUsers(samr, dom_handle):
for idx, user in users:
print "\t%s\t(%d)" % (user.string, idx)
def test_EnumDomainGroups(samr, dom_handle):
"""test the samr_EnumDomainGroups interface"""
print "Testing samr_EnumDomainGroups"
@ -77,11 +84,13 @@ def test_EnumDomainGroups(samr, dom_handle):
for idx, group in groups:
print "\t%s\t(%d)" % (group.string, idx)
def test_domain_ops(samr, dom_handle):
"""test domain specific ops"""
test_EnumDomainUsers(samr, dom_handle)
test_EnumDomainGroups(samr, dom_handle)
def test_EnumDomains(samr, handle):
"""test the samr_EnumDomains interface"""
print "Testing samr_EnumDomains"