mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
r3217: Start of a spoolss_GetPrinter test.
This commit is contained in:
parent
b7ff5f0ded
commit
994fe92feb
@ -36,6 +36,30 @@ def test_ClosePrinter(pipe, handle):
|
||||
dcerpc.spoolss_ClosePrinter(pipe, r)
|
||||
|
||||
|
||||
def test_GetPrinter(pipe, handle):
|
||||
|
||||
r = {}
|
||||
r['handle'] = handle
|
||||
|
||||
for level in [1, 2, 3]:
|
||||
|
||||
r['level'] = level
|
||||
r['buffer'] = None
|
||||
r['buf_size'] = 0
|
||||
|
||||
result = dcerpc.spoolss_GetPrinter(pipe, r)
|
||||
|
||||
print result
|
||||
|
||||
if result['result'] == dcerpc.WERR_INSUFFICIENT_BUFFER:
|
||||
r['buffer'] = result['buf_size'] * '\x00'
|
||||
r['buf_size'] = result['buf_size']
|
||||
|
||||
result = dcerpc.spoolss_GetPrinter(pipe, r)
|
||||
|
||||
print result
|
||||
|
||||
|
||||
def test_EnumPrinters(pipe):
|
||||
|
||||
print 'testing spoolss_EnumPrinters'
|
||||
@ -71,6 +95,8 @@ def test_EnumPrinters(pipe):
|
||||
|
||||
handle = test_OpenPrinterEx(pipe, printer)
|
||||
|
||||
test_GetPrinter(pipe, handle)
|
||||
|
||||
test_ClosePrinter(pipe, handle)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user