diff options
author | Tim Potter <tpot@samba.org> | 2004-10-25 13:06:31 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:42 -0500 |
commit | 8ade4d978506f6b2fab2ccd194f8b62d5d97d168 (patch) | |
tree | 102977cbbdedba21af7abca5c6e1b6b2dde9462d /source4 | |
parent | 974d048493c77c0bc2d7a99c1e16d0ee9643c5ab (diff) | |
download | samba-8ade4d978506f6b2fab2ccd194f8b62d5d97d168.tar.gz samba-8ade4d978506f6b2fab2ccd194f8b62d5d97d168.tar.bz2 samba-8ade4d978506f6b2fab2ccd194f8b62d5d97d168.zip |
r3217: Start of a spoolss_GetPrinter test.
(This used to be commit 994fe92febe38f06d69f43b01c80e8350e902986)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/swig/torture/spoolss.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source4/scripting/swig/torture/spoolss.py b/source4/scripting/swig/torture/spoolss.py index a18b9c61a7..240d815fb4 100644 --- a/source4/scripting/swig/torture/spoolss.py +++ b/source4/scripting/swig/torture/spoolss.py @@ -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) |